From: Yang Yingliang <yangyingliang@huawei.com>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: netdev <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>
Subject: Re: A problem about ICMP packet-too-big message handler
Date: Thu, 29 Jan 2015 11:16:16 +0800 [thread overview]
Message-ID: <54C9A600.9080004@huawei.com> (raw)
In-Reply-To: <20150128121026.GM13046@secunet.com>
On 2015/1/28 20:10, Steffen Klassert wrote:
> On Tue, Jan 27, 2015 at 08:58:53PM +0800, Yang Yingliang wrote:
>> Hi,
>>
>> My kernel is 3.10 LTS.
>>
>> I got a problem here about handling ICMP packet-too-big message.
>>
>> Before sending a packet-too-big packet :
>>
>> # ip -6 route list table local
>> local ::1 dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80::1 dev lo metric 0 //It does not have expire value
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:2 dev lo metric 0
>> local fe80::5054:ff:fe12:3456 dev lo metric 0
>>
>>
>> After sending a packet-too-big packet
>>
>> ip -6 route list table local
>> local ::1 dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80:: dev lo metric 0
>> local fe80::1 dev lo metric 0 expires _597_ //It has expire value
>
> Is this route still present after the expiration time is elapsed?
>
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:0 dev lo metric 0
>> local fe80::200:ff:fe00:2 dev lo metric 0
>> local fe80::5054:ff:fe12:3456 dev lo metric 0
>>
>> When time is up, I can't ping fe80::1 .
>> Is it ok or a bug ?
>
> This looks pretty similar to a bug I discovered recently.
> In my case, a ipv6 host route dissapeared 10 minutes after
> a PMTU event. As a result, this host was not reachable
> anymore.
>
> This happens because we don't clone host routes before
> we use them. If a PMTU event happens, the original route
> is marked with an expire value. After the expiration time
> is elapsed, the original route is deleted and we loose
> conectivity to the host.
>
> I'm currently testing patches to fix this. With these
> patches the ipv6 host routes are cloned if they are
> gateway routes, i.e. if PMTU events can happen.
>
> I fear it will not fix your case because PMTU events are
> not expected to happen at local fe80 routes.
I found current kernel will do ip6_update_pmtu() anyway after
receiving an ICMPV6_PKT_TOOBIG type packet in icmpv6_err().
Does it need some more condition ? Like this:
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index a5e95199585e..7c0a28add109 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -89,8 +89,10 @@ static void icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
/* icmpv6_notify checks 8 bytes can be pulled, icmp6hdr is 8 bytes */
struct icmp6hdr *icmp6 = (struct icmp6hdr *) (skb->data + offset);
struct net *net = dev_net(skb->dev);
+ const struct ipv6hdr *iph = (struct ipv6hdr *) skb->data;
- if (type == ICMPV6_PKT_TOOBIG)
+ if (type == ICMPV6_PKT_TOOBIG &&
+ !(ipv6_addr_type(&iph->daddr) & IPV6_ADDR_LINKLOCAL))
ip6_update_pmtu(skb, net, info, 0, 0);
else if (type == NDISC_REDIRECT)
ip6_redirect(skb, net, skb->dev->ifindex, 0);
Regards,
Yang
prev parent reply other threads:[~2015-01-29 3:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 12:58 A problem about ICMP packet-too-big message handler Yang Yingliang
2015-01-28 5:19 ` Martin Lau
2015-01-28 6:46 ` Yang Yingliang
2015-01-28 12:45 ` Eric Dumazet
2015-01-29 1:04 ` Yang Yingliang
2015-01-28 8:42 ` Hannes Frederic Sowa
2015-01-28 10:07 ` Yang Yingliang
2015-01-28 12:10 ` Steffen Klassert
2015-01-28 12:11 ` [PATCH RFC 1/2] ipv6: Fix after pmtu events dissapearing host routes Steffen Klassert
2015-01-29 10:26 ` Hannes Frederic Sowa
2015-01-29 10:44 ` Steffen Klassert
2015-02-05 23:56 ` Martin Lau
2015-02-09 10:26 ` Steffen Klassert
2015-03-09 9:00 ` Steffen Klassert
2015-01-28 12:12 ` [PATCH RFC 2/2] ipv6: Extend the route lookups to low priority metrics Steffen Klassert
2015-01-29 3:16 ` Yang Yingliang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C9A600.9080004@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.