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

Function defrouter_remove

freebsd/netinet6/nd6_rtr.c:872–889  ·  view source on GitHub ↗

* Look up a matching default router list entry and remove it. Returns true if a * matching entry was found, false otherwise. */

Source from the content-addressed store, hash-verified

870 * matching entry was found, false otherwise.
871 */
872bool
873defrouter_remove(struct in6_addr *addr, struct ifnet *ifp)
874{
875 struct nd_defrouter *dr;
876
877 ND6_WLOCK();
878 dr = defrouter_lookup_locked(addr, ifp);
879 if (dr == NULL) {
880 ND6_WUNLOCK();
881 return (false);
882 }
883
884 defrouter_unlink(dr, NULL);
885 ND6_WUNLOCK();
886 defrouter_del(dr);
887 defrouter_rele(dr);
888 return (true);
889}
890
891/*
892 * for default router selection

Callers 2

nd6_na_inputFunction · 0.85
defrtrlist_updateFunction · 0.85

Calls 4

defrouter_lookup_lockedFunction · 0.85
defrouter_unlinkFunction · 0.85
defrouter_delFunction · 0.85
defrouter_releFunction · 0.85

Tested by

no test coverage detected