Skip to content

Commit

Permalink
Fix --disable-ipv6 option
Browse files Browse the repository at this point in the history
Commit 7e2129f ("ensure that openconnect_disable_{dtls,ipv6} do
nothing if vpninfo has ever been connected") added a check to disallow
setting this... if it wasn't already set, OR the connection had
previously been established. Which seems wrong; I think that was
supposed to have been *AND*.

Not that I object very much to this not working, a whole quarter of a
century after RFC1883 was published. But I wanted to use it for testing
PPP negotiation, and it wasn't working.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dwmw2 authored and dlenski committed Apr 12, 2021
1 parent 7b6103e commit 5ff6a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library.c
Expand Up @@ -626,8 +626,8 @@ int openconnect_disable_ipv6(struct openconnect_info *vpninfo)
* unconfigured state. (Neither a closed TLS socket
* nor tunnel socket is a reliable indicator.)
*/
if (!vpninfo->disable_ipv6
|| vpninfo->ssl_times.last_tx != 0)
if (!vpninfo->disable_ipv6 &&
vpninfo->ssl_times.last_tx != 0)
return -EINVAL;
vpninfo->disable_ipv6 = 1;
return 0;
Expand Down

0 comments on commit 5ff6a02

Please sign in to comment.