Message ID | 20240903135327.2810535-3-idosch@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 97edbbaad30368c2e0219d21987ceba5a303ba5f |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Unmask upper DSCP bits - part 3 | expand |
On Tue, Sep 03, 2024 at 04:53:25PM +0300, Ido Schimmel wrote: > Unmask the upper DSCP bits when calling ip_route_output_ports() so that > in the future it could perform the FIB lookup according to the full DSCP > value. Reviewed-by: Guillaume Nault <gnault@redhat.com>
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index f1a43199551b..089864c6a35e 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1869,7 +1869,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt, vif->remote, vif->local, 0, 0, IPPROTO_IPIP, - RT_TOS(iph->tos), vif->link); + iph->tos & INET_DSCP_MASK, vif->link); if (IS_ERR(rt)) goto out_free; encap = sizeof(struct iphdr); @@ -1877,7 +1877,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt, rt = ip_route_output_ports(net, &fl4, NULL, iph->daddr, 0, 0, 0, IPPROTO_IPIP, - RT_TOS(iph->tos), vif->link); + iph->tos & INET_DSCP_MASK, vif->link); if (IS_ERR(rt)) goto out_free; }
Unmask the upper DSCP bits when calling ip_route_output_ports() so that in the future it could perform the FIB lookup according to the full DSCP value. Signed-off-by: Ido Schimmel <idosch@nvidia.com> --- net/ipv4/ipmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)