Xin Long 35a089b5d7 tipc: check the bearer min mtu properly when setting it by netlink
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@gmail.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-05-15 10:21:20 +01:00
..
2023-05-05 19:12:01 -07:00
2023-04-26 16:07:23 -07:00
2023-04-27 11:53:57 -07:00
2023-02-21 18:24:12 -08:00
2023-03-16 17:34:40 -07:00
2023-02-13 09:30:14 +00:00
2023-04-21 07:35:51 -07:00
2023-05-05 19:12:01 -07:00
2023-04-29 11:04:14 -07:00
2023-04-27 11:53:57 -07:00
2023-04-13 16:43:38 -07:00
2023-04-19 18:46:17 -07:00