MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ipsec_delete_tunnel

Function ipsec_delete_tunnel

freebsd/net/if_ipsec.c:1044–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1042}
1043
1044static void
1045ipsec_delete_tunnel(struct ipsec_softc *sc)
1046{
1047 int i;
1048
1049 sx_assert(&ipsec_ioctl_sx, SA_XLOCKED);
1050
1051 sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
1052 if (sc->family != 0) {
1053 CK_LIST_REMOVE(sc, srchash);
1054 sc->family = 0;
1055 /*
1056 * Make sure that ipsec_if_input() will not do access
1057 * to softc's policies.
1058 */
1059 IPSEC_WAIT();
1060
1061 key_unregister_ifnet(sc->sp, IPSEC_SPCOUNT);
1062 for (i = 0; i < IPSEC_SPCOUNT; i++)
1063 key_freesp(&sc->sp[i]);
1064 }
1065}

Callers 4

ipsec_reassignFunction · 0.85
ipsec_clone_destroyFunction · 0.85
ipsec_ioctlFunction · 0.85
ipsec_set_tunnelFunction · 0.85

Calls 2

key_unregister_ifnetFunction · 0.85
key_freespFunction · 0.85

Tested by

no test coverage detected