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)
Sun, Dec 8, 11:01 PM
Unknown Object (File)
Nov 28 2024, 3:38 AM
Unknown Object (File)
Nov 25 2024, 6:40 AM
Unknown Object (File)
Nov 8 2024, 8:38 PM
Unknown Object (File)
Nov 8 2024, 6:53 PM
Unknown Object (File)
Nov 8 2024, 5:53 PM
Unknown Object (File)
Oct 23 2024, 12:22 PM
Unknown Object (File)
Sep 20 2024, 12:58 PM
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