HomeFreeBSD

arp/nd: Cope with late calls to iflladdr_event

Description

arp/nd: Cope with late calls to iflladdr_event

When tearing down vnet jails we can move an if_bridge out (as
part of the normal vnet_if_return()). This can, when it's clearing out
its list of member interfaces, change its link layer address.
That sends an iflladdr_event, but at that point we've already freed the
AF_INET/AF_INET6 if_afdata pointers.

In other words: when the iflladdr_event callbacks fire we can't assume
that ifp->if_afdata[AF_INET] will be set.

Reviewed by: donner@, melifaro@
MFC after: 1 week
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D28860

(cherry picked from commit c139b3c19b52abe3b5ba23a8175e58e70c7a528d)

Details

Provenance
kpAuthored on Feb 22 2021, 7:19 AM
Differential Revision
D28860: arp/nd: Cope with late calls to iflladdr_event
Parents
rGa20033be9ed8: bridge: Remove members when assigned to a new vnet
Branches
Unknown
Tags
Unknown