cmm: remove the unused cmm_neigh_invalidate() and cmm_neigh_flush_ifindex()
Neither had a caller; cmm_neigh_check() now marks neighbors whose MAC changed or is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ae932c9c46
commit
20b7c34c64
2 changed files with 0 additions and 45 deletions
|
|
@ -341,23 +341,6 @@ cmm_neigh_put(struct cmm_neigh *neigh)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
cmm_neigh_flush_ifindex(int ifindex)
|
||||
{
|
||||
struct cmm_neigh *neigh;
|
||||
struct list_head *pos;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NEIGH_HASH_TOTAL; i++) {
|
||||
for (pos = list_first(&neigh_hash[i]);
|
||||
pos != &neigh_hash[i]; pos = list_next(pos)) {
|
||||
neigh = container_of(pos, struct cmm_neigh, entry);
|
||||
if (neigh->ifindex == ifindex)
|
||||
neigh->state = NEIGH_STALE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cmm_neigh_flush_all(void)
|
||||
{
|
||||
|
|
@ -373,25 +356,3 @@ cmm_neigh_flush_all(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cmm_neigh_invalidate(sa_family_t af, const void *ip)
|
||||
{
|
||||
struct cmm_neigh *neigh;
|
||||
unsigned int h;
|
||||
struct list_head *pos;
|
||||
int alen;
|
||||
|
||||
h = neigh_hash_index(af, ip);
|
||||
alen = (af == AF_INET) ? 4 : 16;
|
||||
|
||||
for (pos = list_first(&neigh_hash[h]); pos != &neigh_hash[h];
|
||||
pos = list_next(pos)) {
|
||||
neigh = container_of(pos, struct cmm_neigh, entry);
|
||||
if (neigh->family == af &&
|
||||
memcmp(neigh->ipaddr, ip, alen) == 0) {
|
||||
neigh->state = NEIGH_STALE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,12 +51,6 @@ void cmm_neigh_put(struct cmm_neigh *neigh);
|
|||
kernel's ARP/NDP table; returns the number marked */
|
||||
int cmm_neigh_check(void);
|
||||
|
||||
/* Invalidate all neighbors on a given interface */
|
||||
void cmm_neigh_flush_ifindex(int ifindex);
|
||||
|
||||
/* Invalidate a specific neighbor (e.g. on ARP change) */
|
||||
void cmm_neigh_invalidate(sa_family_t af, const void *ip);
|
||||
|
||||
/* Mark all neighbors as stale (full reset) */
|
||||
void cmm_neigh_flush_all(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue