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: <562F728C.6030201@cogentembedded.com>
Date:	Tue, 27 Oct 2015 15:48:12 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	"John W. Linville" <linville@...driver.com>, netdev@...r.kernel.org
Cc:	Dave Miller <davem@...emloft.net>,
	Pravin B Shelar <pshelar@...ira.com>,
	Jesse Gross <jesse@...ira.com>, Jiri Benc <jbenc@...hat.com>,
	YOSHIFUJI Hideaki/吉藤英明 
	<hideaki.yoshifuji@...aclelinux.com>
Subject: Re: [PATCH v7 3/3] geneve: add IPv6 bits to geneve_fill_metadata_dst

Hello.

On 10/27/2015 12:01 AM, John W. Linville wrote:

> Signed-off-by: John W. Linville <linville@...driver.com>
> ---
> v7 -- initial version (numbered to match earlier patches in series)
>
>   drivers/net/geneve.c | 28 +++++++++++++++++++++-------
>   1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
> index 44e724508c55..be532d7b879d 100644
> --- a/drivers/net/geneve.c
> +++ b/drivers/net/geneve.c
> @@ -1006,16 +1006,30 @@ static int geneve_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb)
>   	struct geneve_dev *geneve = netdev_priv(dev);
>   	struct rtable *rt;
>   	struct flowi4 fl4;
> +#if IS_ENABLED(CONFIG_IPV6)
> +	struct dst_entry *dst;
> +	struct flowi6 fl6;
> +#endif
>
> -	if (ip_tunnel_info_af(info) != AF_INET)
> -		return -EINVAL;
> +	if (ip_tunnel_info_af(info) == AF_INET) {
> +		rt = geneve_get_v4_rt(skb, dev, &fl4, info);
> +		if (IS_ERR(rt))
> +			return PTR_ERR(rt);
>
> -	rt = geneve_get_v4_rt(skb, dev, &fl4, info);
> -	if (IS_ERR(rt))
> -		return PTR_ERR(rt);
> +		ip_rt_put(rt);
> +		info->key.u.ipv4.src = fl4.saddr;
> +#if IS_ENABLED(CONFIG_IPV6)
> +	} else if (ip_tunnel_info_af(info) == AF_INET6) {
> +		dst = geneve_get_v6_dst(skb, dev, &fl6, info);
> +		if (IS_ERR(dst))
> +			return PTR_ERR(dst);
> +
> +		dst_release(dst);
> +		info->key.u.ipv6.src = fl6.saddr;
> +#endif
> +	} else
> +		return -EINVAL;

    You need {} on this branch too, according to Documentation/CodingStyle.

MBR, 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