Skip to content

Commit c5d8ffe

Browse files
idoschdavem330
authored andcommitted
vrf: Unmask upper DSCP bits in vrf_process_v4_outbound()
Unmask the upper DSCP bits when calling ip_route_output_flow() 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]>
1 parent 939cd1a commit c5d8ffe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/vrf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <net/sch_generic.h>
3838
#include <net/netns/generic.h>
3939
#include <net/netfilter/nf_conntrack.h>
40+
#include <net/inet_dscp.h>
4041

4142
#define DRV_NAME "vrf"
4243
#define DRV_VERSION "1.1"
@@ -520,7 +521,7 @@ static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
520521
/* needed to match OIF rule */
521522
fl4.flowi4_l3mdev = vrf_dev->ifindex;
522523
fl4.flowi4_iif = LOOPBACK_IFINDEX;
523-
fl4.flowi4_tos = RT_TOS(ip4h->tos);
524+
fl4.flowi4_tos = ip4h->tos & INET_DSCP_MASK;
524525
fl4.flowi4_flags = FLOWI_FLAG_ANYSRC;
525526
fl4.flowi4_proto = ip4h->protocol;
526527
fl4.daddr = ip4h->daddr;

0 commit comments

Comments
 (0)