mirror of
https://github.com/opnsense/src.git
synced 2026-06-05 23:04:36 -04:00
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
|
||
|---|---|---|
| .. | ||
| Makefile | ||
| Makefile.depend | ||
| ndp.8 | ||
| ndp.c | ||
| ndp.h | ||
| ndp_netlink.c | ||