From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next v5 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs Date: Wed, 7 Nov 2018 12:07:01 -0700 Message-ID: <05dd6127-34e5-9872-ac86-74520e1fd943@gmail.com> References: <20181107153610.7526-1-mmanning@vyatta.att-mail.com> <20181107153610.7526-5-mmanning@vyatta.att-mail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Mike Manning , netdev@vger.kernel.org Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:44132 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726440AbeKHEio (ORCPT ); Wed, 7 Nov 2018 23:38:44 -0500 Received: by mail-pl1-f194.google.com with SMTP id s5-v6so8264415plq.11 for ; Wed, 07 Nov 2018 11:07:04 -0800 (PST) In-Reply-To: <20181107153610.7526-5-mmanning@vyatta.att-mail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/7/18 8:36 AM, Mike Manning wrote: > Add a sysctl raw_l3mdev_accept to control raw socket lookup in a manner > similar to use of tcp_l3mdev_accept for stream and of udp_l3mdev_accept > for datagram sockets. Have this default to enabled for reasons of > backwards compatibility. This is so as to specify the output device > with cmsg and IP_PKTINFO, but using a socket not bound to the > corresponding VRF. This allows e.g. older ping implementations to be > run with specifying the device but without executing it in the VRF. > If the option is disabled, packets received in a VRF context are only > handled by a raw socket bound to the VRF, and correspondingly packets > in the default VRF are only handled by a socket not bound to any VRF. > > Signed-off-by: Mike Manning > --- > Documentation/networking/ip-sysctl.txt | 12 ++++++++++++ > Documentation/networking/vrf.txt | 13 +++++++++++++ > include/net/netns/ipv4.h | 3 +++ > include/net/raw.h | 1 + > net/ipv4/af_inet.c | 2 ++ > net/ipv4/raw.c | 28 ++++++++++++++++++++++++++-- > net/ipv4/sysctl_net_ipv4.c | 11 +++++++++++ > 7 files changed, 68 insertions(+), 2 deletions(-) Reviewed-by: David Ahern Tested-by: David Ahern