On Sat, Jul 23, 2022 at 02:19:09PM +0200, Gert Doering wrote:
> The new code to enable IPv6 extended error reporting will cause
> an error ("Protocol not available (errno=92)") if trying to enable
> that setsockopt() option on an IPv4-only socket.
> 
> Fix: pass sock->info.af to set_sock_extended_error_passing(), only
> apply to AF_INET6 sockets.
> 
> To make that work, ensure that sock->info.af is set to not only
> the value coming from config (which might be AF_UNSPEC) but to the
> actual value used in socket creation (credits: Arne Schwabe).
> 
> Add comments to make explicit that the asymmetry here (IPv4 extended
> socket error reporting is enabled on all sockets) is intentional.
> 
> Signed-off-by: Gert Doering <g...@greenie.muc.de>

Acked-By: Frank Lichtenheld <fr...@lichtenheld.com>

Tested that it indeed removes the spurious error.
Code changes look good to me.

Regards,
-- 
  Frank Lichtenheld


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to