Patch "ipv4: icmp: Unmask upper DSCP bits in icmp_route_lookup()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ipv4: icmp: Unmask upper DSCP bits in icmp_route_lookup()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ipv4-icmp-unmask-upper-dscp-bits-in-icmp_route_looku.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 70d2a1e3e8e18f517f1bbaba8ea03231ce283ccb
Author: Ido Schimmel <idosch@xxxxxxxxxx>
Date:   Thu Aug 29 09:54:50 2024 +0300

    ipv4: icmp: Unmask upper DSCP bits in icmp_route_lookup()
    
    [ Upstream commit 4805646c42e51d2fbf142864d281473ad453ad5d ]
    
    The function is called to resolve a route for an ICMP message that is
    sent in response to a situation. Based on the type of the generated ICMP
    message, the function is either passed the DS field of the packet that
    generated the ICMP message or a DS field that is derived from it.
    
    Unmask the upper DSCP bits before resolving and output route via
    ip_route_output_key_hash() so that in the future the lookup could be
    performed according to the full DSCP value.
    
    Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx>
    Reviewed-by: Guillaume Nault <gnault@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Stable-dep-of: 27843ce6ba3d ("ipvlan: ensure network headers are in skb linear part")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 3807a269e0755..a154339845dd4 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -93,6 +93,7 @@
 #include <net/ip_fib.h>
 #include <net/l3mdev.h>
 #include <net/addrconf.h>
+#include <net/inet_dscp.h>
 #define CREATE_TRACE_POINTS
 #include <trace/events/icmp.h>
 
@@ -502,7 +503,7 @@ static struct rtable *icmp_route_lookup(struct net *net,
 	fl4->saddr = saddr;
 	fl4->flowi4_mark = mark;
 	fl4->flowi4_uid = sock_net_uid(net, NULL);
-	fl4->flowi4_tos = RT_TOS(tos);
+	fl4->flowi4_tos = tos & INET_DSCP_MASK;
 	fl4->flowi4_proto = IPPROTO_ICMP;
 	fl4->fl4_icmp_type = type;
 	fl4->fl4_icmp_code = code;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux