Skip to content

Commit 939cd1a

Browse files
idoschdavem330
authored andcommitted
ipvlan: Unmask upper DSCP bits in ipvlan_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 6a59526 commit 939cd1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ipvlan/ipvlan_core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/* Copyright (c) 2014 Mahesh Bandewar <[email protected]>
33
*/
44

5+
#include <net/inet_dscp.h>
6+
57
#include "ipvlan.h"
68

79
static u32 ipvlan_jhash_secret __read_mostly;
@@ -420,7 +422,7 @@ static noinline_for_stack int ipvlan_process_v4_outbound(struct sk_buff *skb)
420422
int err, ret = NET_XMIT_DROP;
421423
struct flowi4 fl4 = {
422424
.flowi4_oif = dev->ifindex,
423-
.flowi4_tos = RT_TOS(ip4h->tos),
425+
.flowi4_tos = ip4h->tos & INET_DSCP_MASK,
424426
.flowi4_flags = FLOWI_FLAG_ANYSRC,
425427
.flowi4_mark = skb->mark,
426428
.daddr = ip4h->daddr,

0 commit comments

Comments
 (0)