Date: Tue, 15 Oct 2019 14:29:30 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r353560 - stable/12/sys/netinet6 Message-ID: <201910151429.x9FETUOr007293@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Tue Oct 15 14:29:30 2019 New Revision: 353560 URL: https://svnweb.freebsd.org/changeset/base/353560 Log: Revert r353552 for now. ip6_ctloutput() is missing some requisite changes. Reported by: Jenkins Modified: stable/12/sys/netinet6/ip6_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Tue Oct 15 14:29:18 2019 (r353559) +++ stable/12/sys/netinet6/ip6_output.c Tue Oct 15 14:29:30 2019 (r353560) @@ -1717,24 +1717,21 @@ do { \ #endif case IPV6_V6ONLY: - INP_WLOCK(inp); + /* + * make setsockopt(IPV6_V6ONLY) + * available only prior to bind(2). + * see ipng mailing list, Jun 22 2001. + */ if (in6p->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr)) { - /* - * The socket is already bound. - */ - INP_WUNLOCK(inp); error = EINVAL; break; } - if (optval) { - inp->inp_flags |= IN6P_IPV6_V6ONLY; + OPTSET(IN6P_IPV6_V6ONLY); + if (optval) in6p->inp_vflag &= ~INP_IPV4; - } else { - inp->inp_flags &= ~IN6P_IPV6_V6ONLY; + else in6p->inp_vflag |= INP_IPV4; - } - INP_WUNLOCK(inp); break; case IPV6_RECVTCLASS: /* cannot mix with RFC2292 XXX */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910151429.x9FETUOr007293>