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 78cab9c5a445..b58dc95f3d35 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c | |||
@@ -697,6 +697,11 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b, | |||
697 | udp_conf.local_ip.s_addr = htonl(INADDR_ANY); | 697 | udp_conf.local_ip.s_addr = htonl(INADDR_ANY); |
698 | udp_conf.use_udp_checksums = false; | 698 | udp_conf.use_udp_checksums = false; |
699 | ub->ifindex = dev->ifindex; | 699 | ub->ifindex = dev->ifindex; |
700 | if (tipc_mtu_bad(dev, sizeof(struct iphdr) + | ||
701 | sizeof(struct udphdr))) { | ||
702 | err = -EINVAL; | ||
703 | goto err; | ||
704 | } | ||
700 | b->mtu = dev->mtu - sizeof(struct iphdr) | 705 | b->mtu = dev->mtu - sizeof(struct iphdr) |
701 | - sizeof(struct udphdr); | 706 | - sizeof(struct udphdr); |
702 | #if IS_ENABLED(CONFIG_IPV6) | 707 | #if IS_ENABLED(CONFIG_IPV6) |