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] [day] [month] [year] [list]
Date:	Fri, 12 Aug 2016 10:57:15 -0700
From:	pravin shelar <pshelar@....org>
To:	Simon Horman <simon.horman@...ronome.com>
Cc:	David Miller <davem@...emloft.net>,
	Linux Kernel Network Developers <netdev@...r.kernel.org>,
	Alexander Duyck <alexander.duyck@...il.com>
Subject: Re: [PATCH net v2] gre: set inner_protocol on xmit

On Fri, Aug 12, 2016 at 8:14 AM, Simon Horman
<simon.horman@...ronome.com> wrote:
> Ensure that the inner_protocol is set on transmit so that GSO segmentation,
> which relies on that field, works correctly.
>
> I have observed this is not the case when OvS transmits GRE using
> lwtunnel metadata (which it always does).
>
> Fixes: 38720352412a ("gre: Use inner_proto to obtain inner header protocol")
> Acked-by: Alexander Duyck <alexander.h.duyck@...el.com>
> Signed-off-by: Simon Horman <simon.horman@...ronome.com>
> ---
> v2
> * Added Alexander's Ack
> * Drop RFC designation
> ---
>  net/ipv4/ip_gre.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index 5b1481be0282..1571b71448a0 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -451,6 +451,7 @@ static void gre_fb_xmit(struct sk_buff *skb, struct net_device *dev,
>
>         df = key->tun_flags & TUNNEL_DONT_FRAGMENT ?  htons(IP_DF) : 0;
>
> +       skb_set_inner_protocol(skb, proto);
>         iptunnel_xmit(skb->sk, rt, skb, fl.saddr, key->u.ipv4.dst, IPPROTO_GRE,
>                       key->tos, key->ttl, df, false);
>         return;

This patch is right but can you move this call to gre_build_header().
This way there would less duplicate code. Plus it is more consistent
with vxlan and geneve where the inner protocol is set in respective
build header functions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ