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

Function bridge_rtdaddr

freebsd/net/if_bridge.c:2873–2893  ·  view source on GitHub ↗

* bridge_rtdaddr: * * Remove an address from the table. */

Source from the content-addressed store, hash-verified

2871 * Remove an address from the table.
2872 */
2873static int
2874bridge_rtdaddr(struct bridge_softc *sc, const uint8_t *addr, uint16_t vlan)
2875{
2876 struct bridge_rtnode *brt;
2877 int found = 0;
2878
2879 BRIDGE_RT_LOCK(sc);
2880
2881 /*
2882 * If vlan is zero then we want to delete for all vlans so the lookup
2883 * may return more than one.
2884 */
2885 while ((brt = bridge_rtnode_lookup(sc, addr, vlan)) != NULL) {
2886 bridge_rtnode_destroy(sc, brt);
2887 found = 1;
2888 }
2889
2890 BRIDGE_RT_UNLOCK(sc);
2891
2892 return (found ? 0 : ENOENT);
2893}
2894
2895/*
2896 * bridge_rtdelete:

Callers 1

bridge_ioctl_daddrFunction · 0.85

Calls 2

bridge_rtnode_lookupFunction · 0.85
bridge_rtnode_destroyFunction · 0.85

Tested by

no test coverage detected