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]
Message-ID: <517FB8BD.3090708@cogentembedded.com>
Date:	Tue, 30 Apr 2013 16:27:41 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Cong Wang <amwang@...hat.com>
CC:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>
Subject: Re: [Patch net-next v7 5/6] vxlan: respect disable_ipv6 sysctl

Hello.

On 30-04-2013 12:43, Cong Wang wrote:

> From: Cong Wang <amwang@...hat.com>

> When disable_ipv6 is set, we should not allow IPv6 vxlan
> device to be created on top of it.

> Cc: David Miller <davem@...emloft.net>
> Signed-off-by: Cong Wang <amwang@...hat.com>
> ---
>   drivers/net/vxlan.c |   12 ++++++++++++
>   1 files changed, 12 insertions(+), 0 deletions(-)

> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index bb39e67..ec1007a 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
[...]
> @@ -1722,6 +1725,15 @@ static int vxlan_newlink(struct net *net, struct net_device *dev,
>   			return -ENODEV;
>   		}
>
> +#if IS_ENABLED(CONFIG_IPV6)
> +		if (use_ipv6) {
> +			struct inet6_dev *idev = in6_dev_get(lowerdev);

    Empty line wouldn't hurt here, after declaration.

> +			if (idev && idev->cnf.disable_ipv6)
> +					return -EPERM;
> +		}
> +#else
> +		BUG_ON(use_ipv6);
> +#endif

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ