Date: Fri, 21 Jun 2024 12:41:08 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 279881] socket support for IPv4-mapped IPv6 misbehave Message-ID: <bug-279881-227-vNu38CEDlz@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-279881-227@https.bugs.freebsd.org/bugzilla/> References: <bug-279881-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279881 --- Comment #2 from Andrey V. Elsukov <ae@FreeBSD.org> --- So, I used attached test program: % clang main.c -o test % sudo ifconfig lo0 inet 10.0.0.1/24 alias % ./test main:74: sysctlbyname(net.inet6.ip6.v6only) =3D 1 test:29: socket fd =3D 3 test:35: getsockopt(IPV6_V6ONLY) =3D 1 test:41: setsockopt(IPV6_V6ONLY) -> 0 test:58: connect(::ffff:10.0.0.2) -> 0 test:60: ---------- test:29: socket fd =3D 3 test:35: getsockopt(IPV6_V6ONLY) =3D 1 test:56: connect(::ffff:10.0.0.2): Invalid argument test:60: ---------- % sudo sysctl net.inet6.ip6.v6only=3D0 net.inet6.ip6.v6only: 1 -> 0 % ./test main:74: sysctlbyname(net.inet6.ip6.v6only) =3D 0 test:29: socket fd =3D 3 test:35: getsockopt(IPV6_V6ONLY) =3D 0 test:58: connect(::ffff:10.0.0.2) -> 0 test:60: ---------- test:29: socket fd =3D 3 test:35: getsockopt(IPV6_V6ONLY) =3D 0 test:41: setsockopt(IPV6_V6ONLY) -> 1 test:56: connect(::ffff:10.0.0.2): Invalid argument test:60: ---------- 1. As you can see, getsockopt() returns default value of socket option, that depends on sysctl variable. 2. Depending on V6ONLY sockopt your app can or can not connect. Probably your problem is python related. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279881-227-vNu38CEDlz>