linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Back-porting request
@ 2019-07-29 15:42 Stephen Suryaputra
  2019-07-29 15:56 ` Greg KH
  2019-11-21 22:13 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Suryaputra @ 2019-07-29 15:42 UTC (permalink / raw)
  To: stable; +Cc: linux-kernel, greg, dsahern, davem

Hello,

I'm requesting this commit to be back-ported to v4.14:
---
commit 5b18f1289808fee5d04a7e6ecf200189f41a4db6
Author: Stephen Suryaputra <ssuryaextr@gmail.com>
Date:   Wed Jun 26 02:21:16 2019 -0400

    ipv4: reset rt_iif for recirculated mcast/bcast out pkts

    Multicast or broadcast egress packets have rt_iif set to the oif. These
    packets might be recirculated back as input and lookup to the raw
    sockets may fail because they are bound to the incoming interface
    (skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function
    returns rt_iif instead of skb_iif. Hence, the lookup fails.

    v2: Make it non vrf specific (David Ahern). Reword the changelog to
        reflect it.
    Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
    Reviewed-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---

We found the issue in that release and the above commit is on
linux-stable. On the discussion behind this commit, please see:
https://www.spinics.net/lists/netdev/msg581045.html

I think after the following diff is needed on top of the above commit
for v4.14:

---
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 4d85a4fdfdb0..ad2718c1624e 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1623,11 +1623,8 @@ struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt)
 		new_rt->rt_iif = rt->rt_iif;
 		new_rt->rt_pmtu = rt->rt_pmtu;
 		new_rt->rt_mtu_locked = rt->rt_mtu_locked;
-		new_rt->rt_gw_family = rt->rt_gw_family;
-		if (rt->rt_gw_family == AF_INET)
-			new_rt->rt_gw4 = rt->rt_gw4;
-		else if (rt->rt_gw_family == AF_INET6)
-			new_rt->rt_gw6 = rt->rt_gw6;
+		new_rt->rt_gateway = rt->rt_gateway;
+		new_rt->rt_table_id = rt->rt_table_id;
 		INIT_LIST_HEAD(&new_rt->rt_uncached);
 
 		new_rt->dst.flags |= DST_HOST;
---

Thank you,

Stephen.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Back-porting request
  2019-07-29 15:42 Back-porting request Stephen Suryaputra
@ 2019-07-29 15:56 ` Greg KH
  2019-07-29 17:27   ` Sasha Levin
  2019-11-21 22:13 ` Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2019-07-29 15:56 UTC (permalink / raw)
  To: Stephen Suryaputra; +Cc: stable, linux-kernel, dsahern, davem

On Mon, Jul 29, 2019 at 11:42:34AM -0400, Stephen Suryaputra wrote:
> Hello,
> 
> I'm requesting this commit to be back-ported to v4.14:
> ---
> commit 5b18f1289808fee5d04a7e6ecf200189f41a4db6
> Author: Stephen Suryaputra <ssuryaextr@gmail.com>
> Date:   Wed Jun 26 02:21:16 2019 -0400
> 
>     ipv4: reset rt_iif for recirculated mcast/bcast out pkts
> 
>     Multicast or broadcast egress packets have rt_iif set to the oif. These
>     packets might be recirculated back as input and lookup to the raw
>     sockets may fail because they are bound to the incoming interface
>     (skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function
>     returns rt_iif instead of skb_iif. Hence, the lookup fails.
> 
>     v2: Make it non vrf specific (David Ahern). Reword the changelog to
>         reflect it.
>     Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
>     Reviewed-by: David Ahern <dsahern@gmail.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> 
> We found the issue in that release and the above commit is on
> linux-stable. On the discussion behind this commit, please see:
> https://www.spinics.net/lists/netdev/msg581045.html
> 
> I think after the following diff is needed on top of the above commit
> for v4.14:
> 
> ---
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 4d85a4fdfdb0..ad2718c1624e 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1623,11 +1623,8 @@ struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt)
>  		new_rt->rt_iif = rt->rt_iif;
>  		new_rt->rt_pmtu = rt->rt_pmtu;
>  		new_rt->rt_mtu_locked = rt->rt_mtu_locked;
> -		new_rt->rt_gw_family = rt->rt_gw_family;
> -		if (rt->rt_gw_family == AF_INET)
> -			new_rt->rt_gw4 = rt->rt_gw4;
> -		else if (rt->rt_gw_family == AF_INET6)
> -			new_rt->rt_gw6 = rt->rt_gw6;
> +		new_rt->rt_gateway = rt->rt_gateway;
> +		new_rt->rt_table_id = rt->rt_table_id;
>  		INIT_LIST_HEAD(&new_rt->rt_uncached);
>  
>  		new_rt->dst.flags |= DST_HOST;
> ---
> 
> Thank you,

For networking patches to be applied to the stable kernel tree(s),
please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

There is a section for how to do this for networking patches as they are
accepted a bit differently from other patches.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Back-porting request
  2019-07-29 15:56 ` Greg KH
@ 2019-07-29 17:27   ` Sasha Levin
  0 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2019-07-29 17:27 UTC (permalink / raw)
  To: Greg KH; +Cc: Stephen Suryaputra, stable, linux-kernel, dsahern, davem

On Mon, Jul 29, 2019 at 05:56:27PM +0200, Greg KH wrote:
>On Mon, Jul 29, 2019 at 11:42:34AM -0400, Stephen Suryaputra wrote:
>> Hello,
>>
>> I'm requesting this commit to be back-ported to v4.14:
>> ---
>> commit 5b18f1289808fee5d04a7e6ecf200189f41a4db6
>> Author: Stephen Suryaputra <ssuryaextr@gmail.com>
>> Date:   Wed Jun 26 02:21:16 2019 -0400
>>
>>     ipv4: reset rt_iif for recirculated mcast/bcast out pkts
>>
>>     Multicast or broadcast egress packets have rt_iif set to the oif. These
>>     packets might be recirculated back as input and lookup to the raw
>>     sockets may fail because they are bound to the incoming interface
>>     (skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function
>>     returns rt_iif instead of skb_iif. Hence, the lookup fails.
>>
>>     v2: Make it non vrf specific (David Ahern). Reword the changelog to
>>         reflect it.
>>     Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
>>     Reviewed-by: David Ahern <dsahern@gmail.com>
>>     Signed-off-by: David S. Miller <davem@davemloft.net>
>> ---
>>
>> We found the issue in that release and the above commit is on
>> linux-stable. On the discussion behind this commit, please see:
>> https://www.spinics.net/lists/netdev/msg581045.html
>>
>> I think after the following diff is needed on top of the above commit
>> for v4.14:
>>
>> ---
>> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
>> index 4d85a4fdfdb0..ad2718c1624e 100644
>> --- a/net/ipv4/route.c
>> +++ b/net/ipv4/route.c
>> @@ -1623,11 +1623,8 @@ struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt)
>>  		new_rt->rt_iif = rt->rt_iif;
>>  		new_rt->rt_pmtu = rt->rt_pmtu;
>>  		new_rt->rt_mtu_locked = rt->rt_mtu_locked;
>> -		new_rt->rt_gw_family = rt->rt_gw_family;
>> -		if (rt->rt_gw_family == AF_INET)
>> -			new_rt->rt_gw4 = rt->rt_gw4;
>> -		else if (rt->rt_gw_family == AF_INET6)
>> -			new_rt->rt_gw6 = rt->rt_gw6;
>> +		new_rt->rt_gateway = rt->rt_gateway;
>> +		new_rt->rt_table_id = rt->rt_table_id;
>>  		INIT_LIST_HEAD(&new_rt->rt_uncached);
>>
>>  		new_rt->dst.flags |= DST_HOST;
>> ---
>>
>> Thank you,
>
>For networking patches to be applied to the stable kernel tree(s),
>please read:
>    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>for how to do this properly.
>
>There is a section for how to do this for networking patches as they are
>accepted a bit differently from other patches.

To clarify a bit more here: technically you're asking for a patch to be
included in 4.14, which isn't one of the "last two stable releases", so
that document will tell you to send that patch directly to us.

However, this patch isn't in 4.19 either, which is still Dave's domain,
and we can't take it in 4.14 if it's not in 4.19 (we don't want to
introduce regressions for people who are upgrading their kernels), so
this will still need to go through Dave.

--
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Back-porting request
  2019-07-29 15:42 Back-porting request Stephen Suryaputra
  2019-07-29 15:56 ` Greg KH
@ 2019-11-21 22:13 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-11-21 22:13 UTC (permalink / raw)
  To: Stephen Suryaputra; +Cc: stable, linux-kernel, dsahern, davem

On Mon, Jul 29, 2019 at 11:42:34AM -0400, Stephen Suryaputra wrote:
> Hello,
> 
> I'm requesting this commit to be back-ported to v4.14:
> ---
> commit 5b18f1289808fee5d04a7e6ecf200189f41a4db6
> Author: Stephen Suryaputra <ssuryaextr@gmail.com>
> Date:   Wed Jun 26 02:21:16 2019 -0400
> 
>     ipv4: reset rt_iif for recirculated mcast/bcast out pkts
> 
>     Multicast or broadcast egress packets have rt_iif set to the oif. These
>     packets might be recirculated back as input and lookup to the raw
>     sockets may fail because they are bound to the incoming interface
>     (skb_iif). If rt_iif is not zero, during the lookup, inet_iif() function
>     returns rt_iif instead of skb_iif. Hence, the lookup fails.
> 
>     v2: Make it non vrf specific (David Ahern). Reword the changelog to
>         reflect it.
>     Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
>     Reviewed-by: David Ahern <dsahern@gmail.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> 
> We found the issue in that release and the above commit is on
> linux-stable. On the discussion behind this commit, please see:
> https://www.spinics.net/lists/netdev/msg581045.html
> 
> I think after the following diff is needed on top of the above commit
> for v4.14:
> 
> ---
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 4d85a4fdfdb0..ad2718c1624e 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1623,11 +1623,8 @@ struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt)
>  		new_rt->rt_iif = rt->rt_iif;
>  		new_rt->rt_pmtu = rt->rt_pmtu;
>  		new_rt->rt_mtu_locked = rt->rt_mtu_locked;
> -		new_rt->rt_gw_family = rt->rt_gw_family;
> -		if (rt->rt_gw_family == AF_INET)
> -			new_rt->rt_gw4 = rt->rt_gw4;
> -		else if (rt->rt_gw_family == AF_INET6)
> -			new_rt->rt_gw6 = rt->rt_gw6;
> +		new_rt->rt_gateway = rt->rt_gateway;
> +		new_rt->rt_table_id = rt->rt_table_id;
>  		INIT_LIST_HEAD(&new_rt->rt_uncached);
>  
>  		new_rt->dst.flags |= DST_HOST;
> ---

This only worked for 4.14, this also needs to go to 4.19.  Can you
provide a working backport for both trees so that I can apply it?  I'll
go drop the one I added, as it breaks the build :(

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-21 22:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-29 15:42 Back-porting request Stephen Suryaputra
2019-07-29 15:56 ` Greg KH
2019-07-29 17:27   ` Sasha Levin
2019-11-21 22:13 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).