Patch "tipc: check the bearer min mtu properly when setting it by netlink" has been added to the 5.10-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

    tipc: check the bearer min mtu properly when setting it by netlink

to the 5.10-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:
     tipc-check-the-bearer-min-mtu-properly-when-setting-.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 04a7b319a7cd0e8b342aea5714ff77fa105f356b
Author: Xin Long <lucien.xin@xxxxxxxxx>
Date:   Sun May 14 15:52:29 2023 -0400

    tipc: check the bearer min mtu properly when setting it by netlink
    
    [ Upstream commit 35a089b5d793d2bfd2cc7cfa6104545184de2ce7 ]
    
    Checking the bearer min mtu with tipc_udp_mtu_bad() only works for
    IPv4 UDP bearer, and IPv6 UDP bearer has a different value for the
    min mtu. This patch checks with encap_hlen + TIPC_MIN_BEARER_MTU
    for min mtu, which works for both IPv4 and IPv6 UDP bearer.
    
    Note that tipc_udp_mtu_bad() is still used to check media min mtu
    in __tipc_nl_media_set(), as m->mtu currently is only used by the
    IPv4 UDP bearer as its default mtu value.
    
    Fixes: 682cd3cf946b ("tipc: confgiure and apply UDP bearer MTU on running links")
    Signed-off-by: Xin Long <lucien.xin@xxxxxxxxx>
    Acked-by: Jon Maloy <jmaloy@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index c6a9b3446ff89..91e678fa3feb5 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -1135,8 +1135,8 @@ int __tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info)
 				return -EINVAL;
 			}
 #ifdef CONFIG_TIPC_MEDIA_UDP
-			if (tipc_udp_mtu_bad(nla_get_u32
-					     (props[TIPC_NLA_PROP_MTU]))) {
+			if (nla_get_u32(props[TIPC_NLA_PROP_MTU]) <
+			    b->encap_hlen + TIPC_MIN_BEARER_MTU) {
 				NL_SET_ERR_MSG(info->extack,
 					       "MTU value is out-of-range");
 				return -EINVAL;



[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