Skip to content

Commit bc52a4e

Browse files
idoschkuba-moo
authored andcommitted
ipv4: Unmask upper DSCP bits in NETLINK_FIB_LOOKUP family
The NETLINK_FIB_LOOKUP netlink family can be used to perform a FIB lookup according to user provided parameters and communicate the result back to user space. Unmask the upper DSCP bits of the user-provided DS field before invoking the IPv4 FIB lookup API so that in the future the lookup could be performed according to the full DSCP value. No functional changes intended since the upper DSCP bits are masked when comparing against the TOS selectors in FIB rules and routes. Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Guillaume Nault <[email protected]> Acked-by: Florian Westphal <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ef434fa commit bc52a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/fib_frontend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ static void nl_fib_lookup(struct net *net, struct fib_result_nl *frn)
13431343
struct flowi4 fl4 = {
13441344
.flowi4_mark = frn->fl_mark,
13451345
.daddr = frn->fl_addr,
1346-
.flowi4_tos = frn->fl_tos & IPTOS_RT_MASK,
1346+
.flowi4_tos = frn->fl_tos & INET_DSCP_MASK,
13471347
.flowi4_scope = frn->fl_scope,
13481348
};
13491349
struct fib_table *tb;

0 commit comments

Comments
 (0)