Skip to content

Commit 5003340

Browse files
idoschdavem330
authored andcommitted
bpf: Unmask upper DSCP bits in __bpf_redirect_neigh_v4()
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 c5d8ffe commit 5003340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/filter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2372,7 +2372,7 @@ static int __bpf_redirect_neigh_v4(struct sk_buff *skb, struct net_device *dev,
23722372
struct flowi4 fl4 = {
23732373
.flowi4_flags = FLOWI_FLAG_ANYSRC,
23742374
.flowi4_mark = skb->mark,
2375-
.flowi4_tos = RT_TOS(ip4h->tos),
2375+
.flowi4_tos = ip4h->tos & INET_DSCP_MASK,
23762376
.flowi4_oif = dev->ifindex,
23772377
.flowi4_proto = ip4h->protocol,
23782378
.daddr = ip4h->daddr,

0 commit comments

Comments
 (0)