Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/route.c
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | for (dom = domains; dom; dom = dom->dom_next) { | ||||
for (table = 0; table < rt_numfibs; table++) { | for (table = 0; table < rt_numfibs; table++) { | ||||
fam = dom->dom_family; | fam = dom->dom_family; | ||||
if (table != 0 && fam != AF_INET6 && fam != AF_INET) | if (table != 0 && fam != AF_INET6 && fam != AF_INET) | ||||
break; | break; | ||||
rnh = rt_tables_get_rnh_ptr(table, fam); | rnh = rt_tables_get_rnh_ptr(table, fam); | ||||
if (rnh == NULL) | if (rnh == NULL) | ||||
panic("%s: rnh NULL", __func__); | panic("%s: rnh NULL", __func__); | ||||
dom->dom_rtattach((void **)rnh, 0, table); | *rnh = dom->dom_rtattach(table); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
VNET_SYSINIT(vnet_route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, | VNET_SYSINIT(vnet_route_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, | ||||
vnet_route_init, 0); | vnet_route_init, 0); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
static void | static void | ||||
Show All 12 Lines | for (table = 0; table < rt_numfibs; table++) { | ||||
fam = dom->dom_family; | fam = dom->dom_family; | ||||
if (table != 0 && fam != AF_INET6 && fam != AF_INET) | if (table != 0 && fam != AF_INET6 && fam != AF_INET) | ||||
break; | break; | ||||
rnh = rt_tables_get_rnh_ptr(table, fam); | rnh = rt_tables_get_rnh_ptr(table, fam); | ||||
if (rnh == NULL) | if (rnh == NULL) | ||||
panic("%s: rnh NULL", __func__); | panic("%s: rnh NULL", __func__); | ||||
dom->dom_rtdetach((void **)rnh, 0); | dom->dom_rtdetach(*rnh); | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* dom_rtdetach calls rt_table_destroy(), which | * dom_rtdetach calls rt_table_destroy(), which | ||||
* schedules deletion for all rtentries, nexthops and control | * schedules deletion for all rtentries, nexthops and control | ||||
* structures. Wait for the destruction callbacks to fire. | * structures. Wait for the destruction callbacks to fire. | ||||
* Note that this should result in freeing all rtentries, but | * Note that this should result in freeing all rtentries, but | ||||
▲ Show 20 Lines • Show All 1,090 Lines • Show Last 20 Lines |