ipv6: Don't send packet to big messages to self
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 5 Feb 2013 01:48:05 +0000 (01:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Feb 2013 20:12:39 +0000 (15:12 -0500)
Calling icmpv6_send() on a local message size error leads to an
incorrect update of the path mtu in the case when IPsec is used.
So use ipv6_local_error() instead to notify the socket about the
error.

Reported-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c

index 906b7e6dd7fb9ff2f557801d109bf81a5b29f9f2..c953825f9098c60418b945e98df9f0b7cc79b175 100644 (file)
@@ -242,9 +242,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6,
                               dst->dev, dst_output);
        }
 
-       net_dbg_ratelimited("IPv6: sending pkt_too_big to self\n");
        skb->dev = dst->dev;
-       icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
+       ipv6_local_error(sk, EMSGSIZE, fl6, mtu);
        IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_FRAGFAILS);
        kfree_skb(skb);
        return -EMSGSIZE;