From b2309afc4d746a3a87fa1617c576fb05b5ae7947 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 19 Feb 2014 15:41:48 +0100 Subject: [PATCH] gtp: inconditionally set don't fragment flag Don't use the inner header frag_off, this breaks GTP with fragments. Instead, inconditionally set the DF flag, this should force us to fragment the GTP traffic and I think this should also help with wrong network topologies that result in network loops (that may encapsulated GTP traffic over and over again). Other tunnel implementation allows you to configure this. --- gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtp.c b/gtp.c index 1f9c13e..8a86a8d 100644 --- a/gtp.c +++ b/gtp.c @@ -612,7 +612,7 @@ gtp_push_ip4hdr(struct sk_buff *skb, struct gtp_pktinfo *pktinfo) iph->version = 4; iph->ihl = sizeof(struct iphdr) >> 2; - iph->frag_off = pktinfo->iph->frag_off; + iph->frag_off = htons(IP_DF); iph->protocol = IPPROTO_UDP; iph->tos = pktinfo->iph->tos; iph->daddr = pktinfo->fl4.daddr;