]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv4/ip_tunnel_core.c
tcp: fix a potential NULL pointer dereference in tcp_sk_exit
[mirror_ubuntu-bionic-kernel.git] / net / ipv4 / ip_tunnel_core.c
index 2f39479be92f4602c8cb3f95ca8bc3ca56469f25..423091727e15c9e63ac292c303650597e94b4563 100644 (file)
@@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
 
        iph->version    =       4;
        iph->ihl        =       sizeof(struct iphdr) >> 2;
-       iph->frag_off   =       df;
+       iph->frag_off   =       ip_mtu_locked(&rt->dst) ? 0 : df;
        iph->protocol   =       proto;
        iph->tos        =       tos;
        iph->daddr      =       dst;