Date: Wed, 2 Oct 2019 19:12:26 -0400 From: Ryan Stone <rysto32@gmail.com> To: =?utf-8?B?56We5piO6YGU5ZOJ?= <jinmei@wide.ad.jp> Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: IPv6: Invalid nd6 entry created for an RA without an lladdr Message-ID: <F0FECC44-F3BD-419A-8303-C17B92862509@gmail.com> In-Reply-To: <CAJE_bqfk6f43aC32U26EHi6ETpqyWQyuS%2B32Ep8F5MwRgkjonA@mail.gmail.com> References: <CAFMmRNwntj7aKAPk1D-7%2BCvxRjtPTWX3J7qE0xkAbD=Y%2BdVbxw@mail.gmail.com> <CAJE_bqfk6f43aC32U26EHi6ETpqyWQyuS%2B32Ep8F5MwRgkjonA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ah, that=E2=80=99s my mistake. I originally saw the issue on an older FreeBS= D release and missed that the code had changed subtly when I looked up the v= ersion in head. r328552 fixed this issue already Thanks for the sanity check.=20 Sent from my iPhone > On Oct 2, 2019, at 6:51 PM, =E7=A5=9E=E6=98=8E=E9=81=94=E5=93=89 <jinmei@w= ide.ad.jp> wrote: >=20 > At Wed, 2 Oct 2019 17:04:23 -0400, > Ryan Stone <rysto32@gmail.com> wrote: > >=20 > > At work, our product is putting through an IPv6 conformance test and > > it's found an issue in our handling of Routing Advertisements (RAs). > > If we receive an RA that does not specify an lladdr, then > > nd6_cache_lladdr() is called with lladdr NULL: > >=20 > > https://svnweb.freebsd.org/base/head/sys/netinet6/nd6.c?revision=3D34798= 4&view=3Dmarkup#l1961 > >=20 > > In this case, the linkhdr cache is never initialized, but we still put > > the entry in the STALE state at line 2032. >=20 > If lladdr is NULL shouldn't it reach line 2032? >=20 > if (lladdr !=3D NULL) { /* (7) */ > nd6_llinfo_setstate(ln, ND6_LLINFO_STALE); > EVENTHANDLER_INVOKE(lle_event, ln, > LLENTRY_RESOLVED); > } >=20 > In any case, if a host receives an RA without a link-layer address > option and no neighbor cache entry exists for the RA sender at that > point, it shouldn't set the state of a newly created cache entry to > STALE. While RFC4861 is not so explicit about this particular > condition, I believe it's pretty clear from Section 6.3.4 of the RFC > (it may even be questionable just to create an entry in this case, but > that's probably within the scope of acceptable implementation choices > as long as the entry is a mere placeholder). I also believe FreeBSD > used to not do this (correctly), so if it currently sets it to STALE > it's quite likely to be some regression. >=20 > -- > JINMEI, Tatuya
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F0FECC44-F3BD-419A-8303-C17B92862509>