HomeFreeBSD

if_gif: fix vnet shutdown panic

Description

if_gif: fix vnet shutdown panic

If an if_gif exists and has an address assigned inside a vnet when the
vnet is shut down we failed to clean up the address, leading to a panic
when we ip_destroy() and the V_in_ifaddrhashtbl is not empty.

This happens because of the VNET_SYS(UN)INIT order, which means we
destroy the if_gif interface before the addresses can be purged (and
if_detach() does not remove addresses, it assumes this will be done by
the stack teardown code).

Set subsystem SI_SUB_PSEUDO just like if_bridge so the cleanup
operations happen in the correct order.

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32835

Details

Provenance
kpAuthored on Nov 4 2021, 5:05 PM
Differential Revision
D32835: if_gif: fix vnet shutdown panic
Parents
rG55b0acc0928a: ifconfig.8: Add the missing option -vlanhwcsum
Branches
Unknown
Tags
Unknown