From owner-svn-src-head@freebsd.org Mon Aug 22 14:48:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A673BC26D3; Mon, 22 Aug 2016 14:48:35 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCD57151F; Mon, 22 Aug 2016 14:48:34 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-yb0-x236.google.com with SMTP id b96so3193108ybi.0; Mon, 22 Aug 2016 07:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gE9YV155JnZp0/s1bpv7DmFdEOQkHdpWgzBiNuxjxVA=; b=Rk/A6ANf9xRIRWXtI1DK5EcgfC2mZYgee3yrP+on0jjYDM/KVCLDbtchr5rvr2d1Zh txYANgthEpeRVIHyHr9Gua7f2VQ8CqVyFY8+ukeKyy1lPRJBhTtgRd+cvqw/Q8GNnPrz Ay9j0knf1lSnhPtzy190+HIOBmxq7pgHNuoBxiwS310CMyK2DjuINArQ/SCNrOHoJhiN moMIzc0gZPodXgKvthI/FpefjvZJEKSHTa2Y3taFm6Z5HPTdo+QvG1zmWtg2vMe+Sq22 LKaqxhbqdamt+EheJJGHBZkatGpQUmWlzZtbs7cpqwHsGl83kAcdfEBwlwkhlHqfRCx5 7wSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gE9YV155JnZp0/s1bpv7DmFdEOQkHdpWgzBiNuxjxVA=; b=fTdfIZoeanLU8y34iP4PzL2GLHirk6a6+bEM9G3i0EPPRFXjDF9/Xrqoj5zHX+mGFz pvO7YmqYLpvG5Thg0tomgTcgm/iOoGCoEBUoJlF+d7S2HS5O/UrOrY+IHuTMWAkrZMAk gEXBZ/KjLvtRo5DVGbZsaHrWjhAIK9ZH/SQ+zJeUWtHAAADcRAAAJ1UJV92ko1QOBdHm DHu9YzxjcA8YlNXz45OrEUNBTPHvIh9Io5Ehp6DRSHOuStNM+MTpRCMr+wWQL0ptmnii GJU1lPRQu68LdSYSshFyz8SZldUxDXuyZi8nC61SC7LvyOzfbkt63pui+c967QjgmiI5 T+WA== X-Gm-Message-State: AEkoouuI8X3JyPzbzN7q4FcWg2H8U+bSJVLKAACZ57sPxof9NLrEPKjYQZCRS4h0jCcG9xfoCmKLbWmUG1L3pw== X-Received: by 10.36.77.85 with SMTP id l82mr4963581itb.77.1471877313689; Mon, 22 Aug 2016 07:48:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.200.71 with HTTP; Mon, 22 Aug 2016 07:48:33 -0700 (PDT) In-Reply-To: <201608202212.u7KMCRQU065106@repo.freebsd.org> References: <201608202212.u7KMCRQU065106@repo.freebsd.org> From: Ryan Stone Date: Mon, 22 Aug 2016 10:48:33 -0400 Message-ID: Subject: Re: svn commit: r304548 - head/sys/netinet To: Marko Zec Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 14:48:35 -0000 Thanks! On Sat, Aug 20, 2016 at 6:12 PM, Marko Zec 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; > >