Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
netfilter: br_netfilter: Unmask upper DSCP bits in br_nf_pre_routing_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Reviewed-by: Guillaume Nault <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
idosch authored and davem330 committed Sep 9, 2024
1 parent 8f08854 commit 1f23a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bridge/br_netfilter_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <net/route.h>
#include <net/netfilter/br_netfilter.h>
#include <net/netns/generic.h>
#include <net/inet_dscp.h>

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

rt = ip_route_output(net, iph->daddr, 0,
RT_TOS(iph->tos), 0,
iph->tos & INET_DSCP_MASK, 0,
RT_SCOPE_UNIVERSE);
if (!IS_ERR(rt)) {
/* - Bridged-and-DNAT'ed traffic doesn't
Expand Down

0 comments on commit 1f23a19

Please sign in to comment.