Date: Mon, 22 Aug 2016 10:48:33 -0400 From: Ryan Stone <rysto32@gmail.com> To: Marko Zec <zec@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r304548 - head/sys/netinet Message-ID: <CAFMmRNz=ZwTKzTQg24UvtqyYvXg=6PcYktZL1T-YYvnFiL4zcA@mail.gmail.com> In-Reply-To: <201608202212.u7KMCRQU065106@repo.freebsd.org> References: <201608202212.u7KMCRQU065106@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks! On Sat, Aug 20, 2016 at 6:12 PM, Marko Zec <zec@freebsd.org> wrote: > Author: zec > Date: Sat Aug 20 22:12:26 2016 > New Revision: 304548 > URL: https://svnweb.freebsd.org/changeset/base/304548 > > Log: > Permit disabling net.inet.udp.require_l2_bcast in VIMAGE kernels. > > The default value of the tunable introduced in r304436 couldn't be > effectively overrided on VIMAGE kernels, because instead of being > accessed via the appropriate VNET() accessor macro, it was accessed > via the VNET_NAME() macro, which resolves to the (should-be) read-only > master template of initial values of per-VNET data. Hence, while the > value of udp_require_l2_bcast could be altered on per-VNET basis, the > code in udp_input() would ignore it as it would always read the default > value (one) from the VNET master template. > > Silence from: rstone > > Modified: > head/sys/netinet/udp_usrreq.c > > Modified: head/sys/netinet/udp_usrreq.c > ============================================================ > ================== > --- head/sys/netinet/udp_usrreq.c Sat Aug 20 21:34:41 2016 > (r304547) > +++ head/sys/netinet/udp_usrreq.c Sat Aug 20 22:12:26 2016 > (r304548) > @@ -127,6 +127,7 @@ SYSCTL_INT(_net_inet_udp, OID_AUTO, blac > "Do not send port unreachables for refused connects"); > > static VNET_DEFINE(int, udp_require_l2_bcast) = 1; > +#define V_udp_require_l2_bcast VNET(udp_require_l2_bcast) > SYSCTL_INT(_net_inet_udp, OID_AUTO, require_l2_bcast, CTLFLAG_VNET | > CTLFLAG_RW, > &VNET_NAME(udp_require_l2_bcast), 0, > "Only treat packets sent to an L2 broadcast address as broadcast > packets"); > @@ -528,7 +529,7 @@ udp_input(struct mbuf **mp, int *offp, i > > pcbinfo = udp_get_inpcbinfo(proto); > if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || > - ((!VNET_NAME(udp_require_l2_bcast) || m->m_flags & M_BCAST) && > + ((!V_udp_require_l2_bcast || m->m_flags & M_BCAST) && > in_broadcast(ip->ip_dst, ifp))) { > struct inpcb *last; > struct inpcbhead *pcblist; > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNz=ZwTKzTQg24UvtqyYvXg=6PcYktZL1T-YYvnFiL4zcA>