netlink: fix neighbour deleting for IPv6.

MFC after:	2 weeks
This commit is contained in:
Alexander V. Chernikov 2023-04-25 12:27:02 +00:00
parent 6ad73dbf65
commit 896e22fbc6

View File

@ -479,7 +479,8 @@ rtnl_handle_delneigh(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *
return (EAFNOSUPPORT);
IF_AFDATA_WLOCK(attrs.nda_ifp);
struct llentry *lle = lla_lookup(llt, LLE_EXCLUSIVE, attrs.nda_dst);
struct llentry *lle = lla_lookup(llt, LLE_SF(attrs.ndm_family, LLE_EXCLUSIVE),
attrs.nda_dst);
if (lle != NULL) {
if ((lle->la_flags & LLE_IFADDR) != 0) {
LLE_WUNLOCK(lle);