Re: [PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-30 Thread Jakub Kicinski
On Sun, 29 Nov 2020 13:54:16 +0100 Guillaume Nault wrote: > On Sat, Nov 28, 2020 at 01:17:16PM -0800, Jakub Kicinski wrote: > > On Sat, 28 Nov 2020 10:03:42 -0700 David Ahern wrote: > > > On 11/26/20 11:09 AM, Guillaume Nault wrote: > > > > When inet_rtm_getroute() was converted to use the RCU

Re: [PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-29 Thread Guillaume Nault
On Sat, Nov 28, 2020 at 01:17:16PM -0800, Jakub Kicinski wrote: > On Sat, 28 Nov 2020 10:03:42 -0700 David Ahern wrote: > > On 11/26/20 11:09 AM, Guillaume Nault wrote: > > > When inet_rtm_getroute() was converted to use the RCU variants of > > > ip_route_input() and ip_route_output_key(), the TOS

Re: [PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-28 Thread David Ahern
On 11/26/20 11:09 AM, Guillaume Nault wrote: > When inet_rtm_getroute() was converted to use the RCU variants of > ip_route_input() and ip_route_output_key(), the TOS parameters > stopped being masked with IPTOS_RT_MASK before doing the route lookup. > > As a result, "ip route get" can return a di

Re: [PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-28 Thread Jakub Kicinski
On Sat, 28 Nov 2020 10:03:42 -0700 David Ahern wrote: > On 11/26/20 11:09 AM, Guillaume Nault wrote: > > When inet_rtm_getroute() was converted to use the RCU variants of > > ip_route_input() and ip_route_output_key(), the TOS parameters > > stopped being masked with IPTOS_RT_MASK before doing the

[PATCH net] ipv4: Fix tos mask in inet_rtm_getroute()

2020-11-26 Thread Guillaume Nault
When inet_rtm_getroute() was converted to use the RCU variants of ip_route_input() and ip_route_output_key(), the TOS parameters stopped being masked with IPTOS_RT_MASK before doing the route lookup. As a result, "ip route get" can return a different route than what would be used when sending real