mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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
This commit is contained in:
parent
38c0951386
commit
c139b3c19b
2 changed files with 6 additions and 0 deletions
|
|
@ -1479,6 +1479,10 @@ arp_handle_ifllchange(struct ifnet *ifp)
|
||||||
static void
|
static void
|
||||||
arp_iflladdr(void *arg __unused, struct ifnet *ifp)
|
arp_iflladdr(void *arg __unused, struct ifnet *ifp)
|
||||||
{
|
{
|
||||||
|
/* if_bridge can update its lladdr during if_vmove(), after we've done
|
||||||
|
* if_detach_internal()/dom_ifdetach(). */
|
||||||
|
if (ifp->if_afdata[AF_INET] == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
lltable_update_ifaddr(LLTABLE(ifp));
|
lltable_update_ifaddr(LLTABLE(ifp));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,8 @@ nd6_lle_event(void *arg __unused, struct llentry *lle, int evt)
|
||||||
static void
|
static void
|
||||||
nd6_iflladdr(void *arg __unused, struct ifnet *ifp)
|
nd6_iflladdr(void *arg __unused, struct ifnet *ifp)
|
||||||
{
|
{
|
||||||
|
if (ifp->if_afdata[AF_INET6] == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
lltable_update_ifaddr(LLTABLE6(ifp));
|
lltable_update_ifaddr(LLTABLE6(ifp));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue