On Mon, May 1, 2023 at 11:35 AM Xin Long <lucien....@gmail.com> wrote: > On Mon, May 1, 2023 at 1:21 AM Tung Quang Nguyen > <tung.q.ngu...@dektech.com.au> wrote: >> >@@ -760,6 +760,7 @@ static int tipc_udp_enable(struct net *net, struct >> >tipc_bearer *b, >> > else >> > udp_conf.local_ip6 = local.ipv6; >> > ub->ifindex = dev->ifindex; >> >+ b->encap_hlen = sizeof(struct ipv6hdr) + sizeof(struct >> >udphdr); >> tipc_mtu_bad() needs to be called here to check for the minimum required MTU >> like the way ipv4 UDP bearer does. > > Agree, especially after commit 5a6f6f579178 ("tipc: set ub->ifindex for local > ipv6 address"), we have the dev there. After taking a second look, I think we should delete the tipc_mtu_bad() call for ipv4 UDP bearer, as b->mtu is no longer using dev->mtu since:
commit a4dfa72d0acd ("tipc: set default MTU for UDP media") The issue described in commit 3de81b758853 ("tipc: check minimum bearer MTU") no longer exists in UDP bearer. Besides, dev->mtu can still be changed to a too small mtu after the UDP bearer is created even with the tipc_mtu_bad() check in tipc_udp_enable(). Note that NETDEV_CHANGEMTU event processing in tipc_l2_device_event() doesn't really work for UDP bearer. I will leave this patch as it is in my v2 post, and create another patch for net-next to delete the unnecessary tipc_mtu_bad() check in UDP bearer. Agree? Thanks. _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion