HomeFreeBSD

netinet6: Fix mbuf leak in NDP

Description

netinet6: Fix mbuf leak in NDP

Mbufs leak when manually removing incomplete NDP records with pending packet via ndp -d.
It happens because lltable_drop_entry_queue() rely on la_numheld
counter when dropping NDP entries (lles). It turned out NDP code never
increased la_numheld, so the actual free never happened.

Fix the issue by introducing unified lltable_append_entry_queue(),
common for both ARP and NDP code, properly addressing packet queue
maintenance.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D35365
MFC after: 2 weeks

Details

Provenance
smalukav_gmail.comAuthored on May 31 2022, 8:04 PM
melifaroCommitted on May 31 2022, 9:06 PM
Reviewer
melifaro
Differential Revision
D35365: Fix mbuf leak in NDP
Parents
rG6c92016aa685: pf: fix a race against kif destruction in pf_test{,6}
Branches
Unknown
Tags
Unknown