From: David Ahern <dsahern@gmail.com>
To: Mike Manning <mmanning@vyatta.att-mail.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs
Date: Tue, 6 Nov 2018 11:05:59 -0700 [thread overview]
Message-ID: <6b44b80b-8624-0ea2-5076-3318a0621cae@gmail.com> (raw)
In-Reply-To: <20181102191020.14170-5-mmanning@vyatta.att-mail.com>
On 11/2/18 1:10 PM, Mike Manning wrote:
> diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
> index 8ca3eb06ba04..da453c7dfb75 100644
> --- a/net/ipv4/raw.c
> +++ b/net/ipv4/raw.c
> @@ -805,7 +805,7 @@ static int raw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
> return copied;
> }
>
> -static int raw_init(struct sock *sk)
> +static int raw_sk_init(struct sock *sk)
> {
> struct raw_sock *rp = raw_sk(sk);
>
> @@ -970,7 +970,7 @@ struct proto raw_prot = {
> .connect = ip4_datagram_connect,
> .disconnect = __udp_disconnect,
> .ioctl = raw_ioctl,
> - .init = raw_init,
> + .init = raw_sk_init,
> .setsockopt = raw_setsockopt,
> .getsockopt = raw_getsockopt,
> .sendmsg = raw_sendmsg,
> @@ -1133,4 +1133,16 @@ void __init raw_proc_exit(void)
> {
> unregister_pernet_subsys(&raw_net_ops);
> }
> +
> +static void raw_sysctl_init(void)
> +{
> +#ifdef CONFIG_NET_L3_MASTER_DEV
> + init_net.ipv4.sysctl_raw_l3mdev_accept = 1;
> +#endif
That is not propagated to new network namespaces:
# ip netns add ns1
# ip netns exec ns1 sysctl -a 2>/dev/null | grep l3mdev
net.ipv4.raw_l3mdev_accept = 0
> +}
> +
> +void __init raw_init(void)
> +{
> + raw_sysctl_init();
> +}
> #endif /* CONFIG_PROC_FS */
next prev parent reply other threads:[~2018-11-07 3:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 19:10 [PATCH net-next v4 0/9] vrf: allow simultaneous service instances in default and other VRFs Mike Manning
2018-11-02 19:10 ` [PATCH net-next v4 1/9] net: allow binding socket in a VRF when there's an unbound socket Mike Manning
2018-11-06 17:52 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 2/9] net: ensure unbound stream socket to be chosen when not in a VRF Mike Manning
2018-11-06 17:55 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 3/9] net: ensure unbound datagram " Mike Manning
2018-11-06 17:59 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 4/9] net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs Mike Manning
2018-11-06 18:05 ` David Ahern [this message]
2018-11-02 19:10 ` [PATCH net-next v4 5/9] net: fix raw socket lookup device bind matching " Mike Manning
2018-11-06 18:08 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 6/9] vrf: mark skb for multicast or link-local as enslaved to VRF Mike Manning
2018-11-06 18:13 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 7/9] ipv6: allow ping to link-local address in VRF Mike Manning
2018-11-06 18:14 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 8/9] ipv6: handling of multicast packets received " Mike Manning
2018-11-06 18:24 ` David Ahern
2018-11-02 19:10 ` [PATCH net-next v4 9/9] ipv6: do not drop vrf udp multicast packets Mike Manning
2018-11-06 18:24 ` David Ahern
2018-11-04 15:52 ` [PATCH net-next v4 0/9] vrf: allow simultaneous service instances in default and other VRFs David Ahern
2018-11-04 18:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b44b80b-8624-0ea2-5076-3318a0621cae@gmail.com \
--to=dsahern@gmail.com \
--cc=mmanning@vyatta.att-mail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).