Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upopenvpn: set_ipsec_bypass() doesn't work for IPV6 connections #3541
Conversation
| + } else { /* AF_INET6 */ | ||
| + result = setsockopt(sock, IPPROTO_IPV6, IPV6_SEC_OPT, &ipsr, sizeof (ipsr)); | ||
| + } | ||
| + if (result == -1) { | ||
| + switch (errno) { | ||
| + case EPROTONOSUPPORT: | ||
| + dmsg (D_SOCKET_DEBUG, "Not using IPsec."); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
pyhalov
Oct 10, 2017
•
Author
Contributor
Have one more question... If I receive EPROTONOSUPPORT error in zone, but it works in GZ, does this mean that zone misses some privileges?
This comment has been minimized.
This comment has been minimized.
pyhalov
Oct 10, 2017
Author
Contributor
Also if it fails in zone with EPROTONOSUPPORT, in GZ when run as usual user, it will fail with EPERM (so tests will fail). The question is if we should also handle this fail gracefully (I mean, ignore EPERM as we do with EPROTONOSUPPORT)?
This comment has been minimized.
This comment has been minimized.
danmcd
Oct 10, 2017
•
Contributor
A regular user needs the privilege IP_CONFIG to trigger policy bypasses. EPERM is not ignorable like EPROTONOSUPPORT is.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
danmcd
Oct 10, 2017
Contributor
So clearly we do the is-loaded check BEFORE the privilege check. A regular user will need the IP_CONFIG privilege to bypass. (I thought openvpn needed this privilege anyway?!)
This comment has been minimized.
This comment has been minimized.
pyhalov
Oct 10, 2017
Author
Contributor
well, at least openvpn tests run without root privileges (without this patch). It can do simple client-server pings...
|
Now the only question is if we are going to ignore EPERM error, like we do for EPROTONOSUPPORT. |
|
With this patch applied openvpn needs IP_CONFIG privilege, so test can fail with EPERM |
pyhalov commentedOct 9, 2017
No description provided.