diff options
Diffstat (limited to 'net/tipc/udp_media.c')
-rw-r--r-- | net/tipc/udp_media.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index f8dfee5072c0..e14f23542a1a 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c | |||
@@ -374,6 +374,11 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b, | |||
374 | udp_conf.local_ip.s_addr = htonl(INADDR_ANY); | 374 | udp_conf.local_ip.s_addr = htonl(INADDR_ANY); |
375 | udp_conf.use_udp_checksums = false; | 375 | udp_conf.use_udp_checksums = false; |
376 | ub->ifindex = dev->ifindex; | 376 | ub->ifindex = dev->ifindex; |
377 | if (tipc_mtu_bad(dev, sizeof(struct iphdr) + | ||
378 | sizeof(struct udphdr))) { | ||
379 | err = -EINVAL; | ||
380 | goto err; | ||
381 | } | ||
377 | b->mtu = dev->mtu - sizeof(struct iphdr) | 382 | b->mtu = dev->mtu - sizeof(struct iphdr) |
378 | - sizeof(struct udphdr); | 383 | - sizeof(struct udphdr); |
379 | #if IS_ENABLED(CONFIG_IPV6) | 384 | #if IS_ENABLED(CONFIG_IPV6) |