lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Nov 2018 11:05:59 -0700
From:   David Ahern <dsahern@...il.com>
To:     Mike Manning <mmanning@...tta.att-mail.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v4 4/9] net: provide a sysctl raw_l3mdev_accept
 for raw socket lookup with VRFs

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 */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ