Hi Martin,

Thanks for the quick reply!

On Mon, Mar 06, 2017 at 01:12:12PM +0100, Martin Pieuchot wrote:
| > Deleting the expired entry doesn't seem very effective:
| 
| It *is* effective since it solved your problem.  A cached entry, like
| the one referenced by your default route is no longer 'deleted' it is
| 'flushed'.  In practice it doesn't change much since such entries are
| created automagically.  But you found a bug!
| 
| Diff below should solve that by resetting the 'asked' counter and allow
| our NDP code to generate a new NS.  Just like the delete command does.

Thanks for the diff, I will give it a shot.  Since this doesn't happen
frequently, it'll be hard to tell if it's fixed though.

| > [...]
| > What else can I do to further debug this issue?
| 
| Next time this happen use tcpdump(8) and filter NS packets.  Try sending
| a single packet using ping and see if/when a new NS is sent.

That makes a lot of sense, and I should've included that information
in my initial report.  For completeness, I tried it on another machine
that has the same behaviour.  I'm running tcpdump on the affected host.

Pinging from another machine to the affected machine:

15:06:34.919375 00:60:e0:52:0f:96 33:33:ff:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::2 
> ff02::1:ffd9:dd9d: icmp6: neighbor sol: who has 
20xx:xxxx:xxxx:0:8a53:2eff:fed9:dd9d(src lladdr: 00:60:e0:52:0f:96) [icmp6 
cksum ok] (len 32, hlim 255)
15:06:35.943394 00:60:e0:52:0f:96 33:33:ff:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::2 
> ff02::1:ffd9:dd9d: icmp6: neighbor sol: who has 
20xx:xxxx:xxxx:0:8a53:2eff:fed9:dd9d(src lladdr: 00:60:e0:52:0f:96) [icmp6 
cksum ok] (len 32, hlim 255)
15:06:36.967041 00:60:e0:52:0f:96 33:33:ff:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::2 
> ff02::1:ffd9:dd9d: icmp6: neighbor sol: who has 
20xx:xxxx:xxxx:0:8a53:2eff:fed9:dd9d(src lladdr: 00:60:e0:52:0f:96) [icmp6 
cksum ok] (len 32, hlim 255)

i.e. neighbor solicitations arrive just fine, the machine is just not
responding.

Pinging from the affected machine to anything on the internet (after
deleting the NDP entry):

15:06:51.269270 88:53:2e:d9:dd:9d 33:33:ff:52:0f:96 86dd 86: 
20xx:xxxx:xxxx:0:90dd:36c4:11de:1043 > ff02::1:ff52:f96: icmp6: neighbor sol: 
who has fe80::260:e0ff:fe52:f96(src lladdr: 88:53:2e:d9:dd:9d) [icmp6 cksum ok] 
(len 32, hlim 255)
15:06:51.273479 00:60:e0:52:0f:96 88:53:2e:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::1 
> 20xx:xxxx:xxxx:0:90dd:36c4:11de:1043: icmp6: neighbor adv: tgt is 
fe80::260:e0ff:fe52:f96(RSO)(tgt lladdr: 00:60:e0:52:0f:96) [icmp6 cksum ok] 
(len 32, hlim 255)
15:06:52.263210 88:53:2e:d9:dd:9d 33:33:ff:52:0f:96 86dd 86: 
20xx:xxxx:xxxx:0:90dd:36c4:11de:1043 > ff02::1:ff52:f96: icmp6: neighbor sol: 
who has fe80::260:e0ff:fe52:f96(src lladdr: 88:53:2e:d9:dd:9d) [icmp6 cksum ok] 
(len 32, hlim 255)
15:06:52.264879 00:60:e0:52:0f:96 88:53:2e:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::1 
> 20xx:xxxx:xxxx:0:90dd:36c4:11de:1043: icmp6: neighbor adv: tgt is 
fe80::260:e0ff:fe52:f96(RSO)(tgt lladdr: 00:60:e0:52:0f:96) [icmp6 cksum ok] 
(len 32, hlim 255)
15:06:53.263234 88:53:2e:d9:dd:9d 33:33:ff:52:0f:96 86dd 86: 
20xx:xxxx:xxxx:0:90dd:36c4:11de:1043 > ff02::1:ff52:f96: icmp6: neighbor sol: 
who has fe80::260:e0ff:fe52:f96(src lladdr: 88:53:2e:d9:dd:9d) [icmp6 cksum ok] 
(len 32, hlim 255)
15:06:53.269814 00:60:e0:52:0f:96 88:53:2e:d9:dd:9d 86dd 86: 20xx:xxxx:xxxx::1 
> 20xx:xxxx:xxxx:0:90dd:36c4:11de:1043: icmp6: neighbor adv: tgt is 
fe80::260:e0ff:fe52:f96(RSO)(tgt lladdr: 00:60:e0:52:0f:96) [icmp6 cksum ok] 
(len 32, hlim 255)

i.e. the machine is asking for the address of the default gateway, and
the default gateway is responding just fine, but the answer is
ignored.

Cheers,

Paul

| Index: netinet6/nd6.c
| ===================================================================
| RCS file: /cvs/src/sys/netinet6/nd6.c,v
| retrieving revision 1.205
| diff -u -p -r1.205 nd6.c
| --- netinet6/nd6.c    3 Mar 2017 08:01:59 -0000       1.205
| +++ netinet6/nd6.c    6 Mar 2017 12:02:53 -0000
| @@ -834,7 +834,9 @@ nd6_free(struct rtentry *rt, int gc)
|        * caches, and disable the route entry not to be used in already
|        * cached routes.
|        */
| -     if (!ISSET(rt->rt_flags, RTF_STATIC|RTF_CACHED))
| +     if (ISSET(rt->rt_flags, RTF_CACHED))
| +             nd6_invalidate(rt);
| +     else if (!ISSET(rt->rt_flags, RTF_STATIC))
|               rtdeletemsg(rt, ifp, ifp->if_rdomain);
|  
|       if_put(ifp);

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to