gtp: fix handling of gso packets

Don't get confused with big GSO packets, we should not send
icmp frag needed as the temporary internal mtu of the linux
stack is not bounded to the real device mtu.
This commit is contained in:
Pablo Neira Ayuso 2014-02-18 17:18:50 +01:00
parent 2734d0fa31
commit 0d61da7cab
1 changed files with 2 additions and 3 deletions

5
gtp.c
View File

@ -567,10 +567,9 @@ static int gtp_ip4_prepare_xmit(struct sk_buff *skb, struct net_device *dev,
if (skb_dst(skb))
skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, mtu);
df |= (iph->frag_off & htons(IP_DF));
if ((iph->frag_off & htons(IP_DF)) &&
if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) &&
mtu < ntohs(iph->tot_len)) {
memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
htonl(mtu));
goto err_rt;