summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/peer.c4
-rw-r--r--src/peer.h1
-rw-r--r--src/task.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/src/peer.c b/src/peer.c
index 7f1ccb5..3b66bae 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -971,7 +971,7 @@ static bool maintain_peer(fastd_peer_t *peer) {
}
/** Removes all time-outed MAC addresses from \e ctx.eth_addrs */
-static void eth_addr_cleanup(void) {
+void fastd_peer_eth_addr_cleanup(void) {
size_t i, deleted = 0;
for (i = 0; i < VECTOR_LEN(ctx.eth_addrs); i++) {
@@ -997,8 +997,6 @@ void fastd_peer_maintenance(void) {
if (maintain_peer(peer))
i++;
}
-
- eth_addr_cleanup();
}
/** Resets all peers */
diff --git a/src/peer.h b/src/peer.h
index e83859e..a9f48ab 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -271,6 +271,7 @@ void fastd_peer_eth_addr_add(fastd_peer_t *peer, fastd_eth_addr_t addr);
bool fastd_peer_find_by_eth_addr(const fastd_eth_addr_t addr, fastd_peer_t **peer);
void fastd_peer_handle_handshake_task(fastd_task_t *task);
+void fastd_peer_eth_addr_cleanup(void);
void fastd_peer_maintenance(void);
void fastd_peer_reset_all(void);
diff --git a/src/task.c b/src/task.c
index aa6225a..2fe79c8 100644
--- a/src/task.c
+++ b/src/task.c
@@ -37,6 +37,7 @@
static inline void maintenance(void) {
fastd_socket_handle_binds();
fastd_peer_maintenance();
+ fastd_peer_eth_addr_cleanup();
fastd_task_reschedule_relative(&ctx.next_maintenance, MAINTENANCE_INTERVAL);
}