Message ID | 401254e10285db58966f64793d4762c23a25f9d3.1684093873.git.lucien.xin@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 35a089b5d793d2bfd2cc7cfa6104545184de2ce7 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tipc: fix the mtu update in link mtu negotiation | expand |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 0e9a29e1536b..53881406e200 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -1151,8 +1151,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;