* bridge_rtdaddr: * * Remove an address from the table. */
| 2871 | * Remove an address from the table. |
| 2872 | */ |
| 2873 | static int |
| 2874 | bridge_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: |
no test coverage detected