Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route.c
Show First 20 Lines • Show All 487 Lines • ▼ Show 20 Lines | rt_ifdelroute(const struct rtentry *rt, const struct nhop_object *nh, void *arg) | ||||
* with cloned routes | * with cloned routes | ||||
*/ | */ | ||||
if ((rt->rte_flags & RTF_UP) == 0) | if ((rt->rte_flags & RTF_UP) == 0) | ||||
return (0); | return (0); | ||||
return (1); | return (1); | ||||
} | } | ||||
/* | |||||
* Delete all remaining routes using this interface | |||||
* Unfortuneatly the only way to do this is to slog through | |||||
* the entire routing table looking for routes which point | |||||
* to this interface...oh well... | |||||
*/ | |||||
void | |||||
rt_flushifroutes_af(struct ifnet *ifp, int af) | |||||
{ | |||||
KASSERT((af >= 1 && af <= AF_MAX), ("%s: af %d not >= 1 and <= %d", | |||||
__func__, af, AF_MAX)); | |||||
rib_foreach_table_walk_del(af, rt_ifdelroute, ifp); | |||||
} | |||||
void | void | ||||
rt_flushifroutes(struct ifnet *ifp) | rt_flushifroutes(struct ifnet *ifp) | ||||
{ | { | ||||
rib_foreach_table_walk_del(AF_UNSPEC, rt_ifdelroute, ifp); | rib_foreach_table_walk_del(AF_UNSPEC, rt_ifdelroute, ifp); | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |