Patch "ip_tunnel: fix ipv4 pmtu check to honor inner ip header df" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ip_tunnel: fix ipv4 pmtu check to honor inner ip header df
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ip_tunnel-fix-ipv4-pmtu-check-to-honor-inner-ip-header-df.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sat Sep 26 11:13:07 PDT 2015
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <[email protected]>
Date: Tue, 7 Jul 2015 08:34:13 +0300
Subject: ip_tunnel: fix ipv4 pmtu check to honor inner ip header df
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <[email protected]>
[ Upstream commit fc24f2b2094366da8786f59f2606307e934cea17 ]
Frag needed should be sent only if the inner header asked to not fragment. Currently fragmentation is broken if the tunnel has df set, but df was not asked in the original packet. The tunnel's df needs to be still checked to update internally the pmtu cache.
Commit 23a3647bc4f93bac broke it, and this commit fixes the ipv4 df check back to the way it was.
--- net/ipv4/ip_tunnel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
net/ipv4/ip_tunnel.c +5 -3
@@ -586,7 +586,8 @@ int ip_tunnel_encap(struct sk_buff *skb,EXPORT_SYMBOL (ip_tunnel_encap);static int tnl_update_pmtu (struct net_device *dev,struct sk_buff *skb, -struct rtable *rt,__be16 df) +struct rtable *rt,__be16 df, +const struct iphdr *inner_iph) {struct ip_tunnel *tunnel =netdev_priv (dev);int pkt_size = skb->len - tunnel->hlen - dev->hard_header_len;
@@ -603,7 +604,8 @@ static int tnl_update_pmtu(struct net_deif (skb->protocol ==htons (ETH_P_IP )) {if (!skb_is_gso (skb) && - (df &htons (IP_DF )) && mtu < pkt_size) { + (inner_iph->frag_off &htons (IP_DF )) && + mtu < pkt_size) {memset (IPCB (skb),0 ,sizeof (*IPCB (skb)));icmp_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED ,htonl (mtu));return -E2BIG ;
@@ -737,7 +739,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, goto tx_error; } -if (tnl_update_pmtu (dev, skb, rt, tnl_params->frag_off)) { +if (tnl_update_pmtu (dev, skb, rt, tnl_params->frag_off, inner_iph)) {ip_rt_put (rt); goto tx_error; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/ip_tunnel-fix-ipv4-pmtu-check-to-honor-inner-ip-header-df.patch