Skip to content

Commit 1f23a19

Browse files
idoschdavem330
authored andcommitted
netfilter: br_netfilter: Unmask upper DSCP bits in br_nf_pre_routing_finish()
Unmask upper DSCP bits when calling ip_route_output() so that in the future it 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 8f08854 commit 1f23a19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bridge/br_netfilter_hooks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <net/route.h>
3737
#include <net/netfilter/br_netfilter.h>
3838
#include <net/netns/generic.h>
39+
#include <net/inet_dscp.h>
3940

4041
#include <linux/uaccess.h>
4142
#include "br_private.h"
@@ -402,7 +403,7 @@ static int br_nf_pre_routing_finish(struct net *net, struct sock *sk, struct sk_
402403
goto free_skb;
403404

404405
rt = ip_route_output(net, iph->daddr, 0,
405-
RT_TOS(iph->tos), 0,
406+
iph->tos & INET_DSCP_MASK, 0,
406407
RT_SCOPE_UNIVERSE);
407408
if (!IS_ERR(rt)) {
408409
/* - Bridged-and-DNAT'ed traffic doesn't

0 commit comments

Comments
 (0)