]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv4/ip_tunnel_core.c
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / net / ipv4 / ip_tunnel_core.c
index afd6b5968cafb720405c8243f9f0d9491a1bfd07..9d847c3025516f3225c60be7c492adff4d254e5b 100644 (file)
@@ -63,6 +63,7 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
        int pkt_len = skb->len - skb_inner_network_offset(skb);
        struct net *net = dev_net(rt->dst.dev);
        struct net_device *dev = skb->dev;
+       int skb_iif = skb->skb_iif;
        struct iphdr *iph;
        int err;
 
@@ -72,6 +73,14 @@ void iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
        skb_dst_set(skb, &rt->dst);
        memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
 
+       if (skb_iif && proto == IPPROTO_UDP) {
+               /* Arrived from an ingress interface and got udp encapuslated.
+                * The encapsulated network segment length may exceed dst mtu.
+                * Allow IP Fragmentation of segments.
+                */
+               IPCB(skb)->flags |= IPSKB_FRAG_SEGS;
+       }
+
        /* Push down and install the IP header. */
        skb_push(skb, sizeof(struct iphdr));
        skb_reset_network_header(skb);