Skip to content

Commit e7191e5

Browse files
idoschdavem330
authored andcommitted
ipv4: ip_tunnel: Unmask upper DSCP bits in ip_tunnel_bind_dev()
Unmask the upper DSCP bits when initializing an IPv4 flow key via ip_tunnel_init_flow() before passing it to ip_route_output_key() so that in the future we could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 848789d commit e7191e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/ip_tunnel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static int ip_tunnel_bind_dev(struct net_device *dev)
293293

294294
ip_tunnel_init_flow(&fl4, iph->protocol, iph->daddr,
295295
iph->saddr, tunnel->parms.o_key,
296-
RT_TOS(iph->tos), dev_net(dev),
296+
iph->tos & INET_DSCP_MASK, dev_net(dev),
297297
tunnel->parms.link, tunnel->fwmark, 0, 0);
298298
rt = ip_route_output_key(tunnel->net, &fl4);
299299

0 commit comments

Comments
 (0)