nd6: retire defrouter_select(), use _fib() variant.
Burn bridges and replace the last two calls of defrouter_select() with defrouter_select_fib(). That allows us to retire defrouter_select() and make it more clear in the calling code that it applies to all FIBs. Sponsored by: Netflix
This commit is contained in:
parent
f592d0c377
commit
808c432f62
@ -1746,7 +1746,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
|
||||
case SIOCSNDFLUSH_IN6: /* XXX: the ioctl name is confusing... */
|
||||
/* sync kernel routing table with the default router list */
|
||||
defrouter_reset();
|
||||
defrouter_select();
|
||||
defrouter_select_fib(RT_ALL_FIBS);
|
||||
break;
|
||||
case SIOCSPFXFLUSH_IN6:
|
||||
{
|
||||
@ -1786,7 +1786,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
|
||||
|
||||
defrouter_reset();
|
||||
nd6_defrouter_flush_all();
|
||||
defrouter_select();
|
||||
defrouter_select_fib(RT_ALL_FIBS);
|
||||
break;
|
||||
}
|
||||
case SIOCGNBRINFO_IN6:
|
||||
|
@ -405,7 +405,6 @@ struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *);
|
||||
struct nd_defrouter *defrouter_lookup_locked(struct in6_addr *, struct ifnet *);
|
||||
void defrouter_reset(void);
|
||||
void defrouter_select_fib(int fibnum);
|
||||
void defrouter_select(void);
|
||||
void defrouter_rele(struct nd_defrouter *);
|
||||
bool defrouter_remove(struct in6_addr *, struct ifnet *);
|
||||
bool nd6_defrouter_list_empty(void);
|
||||
|
@ -987,16 +987,6 @@ defrouter_select_fib(int fibnum)
|
||||
defrouter_rele(selected_dr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Maintain old KPI for default router selection.
|
||||
* If unspecified, we can re-select routers for all FIBs.
|
||||
*/
|
||||
void
|
||||
defrouter_select(void)
|
||||
{
|
||||
defrouter_select_fib(RT_ALL_FIBS);
|
||||
}
|
||||
|
||||
/*
|
||||
* for default router selection
|
||||
* regards router-preference field as a 2-bit signed integer
|
||||
|
Loading…
Reference in New Issue
Block a user