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

Function rt6_flush

freebsd/netinet6/nd6_rtr.c:2412–2422  ·  view source on GitHub ↗

* Delete all the routing table entries that use the specified gateway. * XXX: this function causes search through all entries of routing table, so * it shouldn't be called when acting as a router. */

Source from the content-addressed store, hash-verified

2410 * it shouldn't be called when acting as a router.
2411 */
2412void
2413rt6_flush(struct in6_addr *gateway, struct ifnet *ifp)
2414{
2415
2416 /* We'll care only link-local addresses */
2417 if (!IN6_IS_ADDR_LINKLOCAL(gateway))
2418 return;
2419
2420 /* XXX Do we really need to walk any but the default FIB? */
2421 rib_foreach_table_walk_del(AF_INET6, rt6_deleteroute, (void *)gateway);
2422}
2423
2424int
2425nd6_setdefaultiface(int ifindex)

Callers 3

nd6_freeFunction · 0.85
nd6_na_inputFunction · 0.85
defrouter_delFunction · 0.85

Calls 1

Tested by

no test coverage detected