freebsd-src/usr.sbin/ndp
Kristof Provost b57df6fbcc ndp: cope with unresolved neighbours
If we've not (yet) resolved a neighbour nda_lladdr will be NULL, and
NLA_DATA_LEN(neigh->nda_lladdr) will dereference a NULL pointer.

Avoid that by checking nda_lladdr first, and only dereferencing if it's
not NULL.

Test case:
	ping6 -c 1 <non-existant neighbour>
	ndp -a

Reviewed by:	melifaro
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D41903
2023-09-18 20:12:45 +02:00
..
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ndp.8 Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
ndp.c Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
ndp.h ndp: convert ndp(8) to netlink. 2023-04-25 12:30:39 +00:00
ndp_netlink.c ndp: cope with unresolved neighbours 2023-09-18 20:12:45 +02:00