Page MenuHomeFreeBSD

ndp: cope with unresolved neighbours
ClosedPublic

Authored by kp on Sep 18 2023, 5:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Aug 9, 3:36 PM
Unknown Object (File)
Fri, Aug 8, 3:03 AM
Unknown Object (File)
Sat, Aug 2, 5:15 PM
Unknown Object (File)
Jul 17 2025, 3:32 PM
Unknown Object (File)
Jul 11 2025, 11:31 AM
Unknown Object (File)
Jul 6 2025, 6:23 PM
Unknown Object (File)
Jun 11 2025, 8:53 PM
Unknown Object (File)
Jun 1 2025, 4:33 AM
Subscribers

Details

Summary

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

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable