Provide a public interface to rt_flushifroutes which takes the address
family as an argument as well. This will be used to cleanup individual protocols during VNET teardown. Obtained from: projects/vnet Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
4948c572e7
commit
8757b6342b
@ -1140,6 +1140,15 @@ rt_ifdelroute(const struct rtentry *rt, void *arg)
|
||||
* 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));
|
||||
|
||||
rt_foreach_fib_walk_del(af, rt_ifdelroute, ifp);
|
||||
}
|
||||
|
||||
void
|
||||
rt_flushifroutes(struct ifnet *ifp)
|
||||
{
|
||||
|
@ -468,6 +468,7 @@ typedef int rt_walktree_f_t(struct rtentry *, void *);
|
||||
typedef void rt_setwarg_t(struct rib_head *, uint32_t, int, void *);
|
||||
void rt_foreach_fib_walk(int af, rt_setwarg_t *, rt_walktree_f_t *, void *);
|
||||
void rt_foreach_fib_walk_del(int af, rt_filter_f_t *filter_f, void *arg);
|
||||
void rt_flushifroutes_af(struct ifnet *, int);
|
||||
void rt_flushifroutes(struct ifnet *ifp);
|
||||
|
||||
/* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user