Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-09-01 Thread David Miller
From: Eli Cooper Date: Thu, 1 Sep 2016 09:18:04 +0800 > Hello, > > On 2016/9/1 4:56, David Miller wrote: >> From: Eli Cooper >> Date: Fri, 26 Aug 2016 23:52:29 +0800 >> >>> @@ -1174,6 +1174,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct >>> net_device *dev) >>> encap_limit = t->p

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-31 Thread Eli Cooper
Hello, On 2016/9/1 4:56, David Miller wrote: > From: Eli Cooper > Date: Fri, 26 Aug 2016 23:52:29 +0800 > >> @@ -1174,6 +1174,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device >> *dev) >> encap_limit = t->parms.encap_limit; >> >> memcpy(&fl6, &t->fl.u.ip6, sizeof(fl

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-31 Thread David Miller
From: Eli Cooper Date: Fri, 26 Aug 2016 23:52:29 +0800 > @@ -1174,6 +1174,7 @@ ip4ip6_tnl_xmit(struct sk_buff *skb, struct net_device > *dev) > encap_limit = t->parms.encap_limit; > > memcpy(&fl6, &t->fl.u.ip6, sizeof(fl6)); > + fl6.flowi6_proto = IPPROTO_IPIP; Let's j

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-26 Thread Eli Cooper
Hi, On 2016/8/27 3:49, Shmulik Ladkani wrote: > However new users of 'ip6_tnl_xmit' (e.g. __gre6_xmit callers) may still > have their 'fl6->flowi6_proto' not armed. > > Maybe the right fix is assigning 'fl6->flowi6_proto = proto', either at > start of 'ip6_tnl_xmit' or just prior the ip6_route_out

Re: [PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-26 Thread Shmulik Ladkani
Hi, On Fri, 26 Aug 2016 23:52:29 +0800 Eli Cooper wrote: > Commit 8eb30be0352d0916 ("ipv6: Create ip6_tnl_xmit") unsets > flowi6_proto in ip4ip6_tnl_xmit() and ip6ip6_tnl_xmit(). > Since xfrm_selector_match() relies on this info, IPv6 packets > sent by an ip6tunnel cannot be properly selected by

[PATCH] ipv6: Don't unset flowi6_proto in ipxip6_tnl_xmit()

2016-08-26 Thread Eli Cooper
Commit 8eb30be0352d0916 ("ipv6: Create ip6_tnl_xmit") unsets flowi6_proto in ip4ip6_tnl_xmit() and ip6ip6_tnl_xmit(). Since xfrm_selector_match() relies on this info, IPv6 packets sent by an ip6tunnel cannot be properly selected by their protocols after removing it. This patch puts flowi6_proto bac