diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-16 18:47:01 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-11-16 18:47:01 +0100 |
commit | cca293a6d474b2bd02a5fbfb1f2fae6179c395d6 (patch) | |
tree | ff6c9bad9fa726c505babf3de5a261f6953c4ef6 | |
parent | bb761bafb89a734fdc98a8e12cfff3b0c16fb0af (diff) | |
download | fastd-cca293a6d474b2bd02a5fbfb1f2fae6179c395d6.tar fastd-cca293a6d474b2bd02a5fbfb1f2fae6179c395d6.zip |
Call ethernet address cleanup from generic maintenance task
-rw-r--r-- | src/peer.c | 4 | ||||
-rw-r--r-- | src/peer.h | 1 | ||||
-rw-r--r-- | src/task.c | 1 |
3 files changed, 3 insertions, 3 deletions
@@ -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 */ @@ -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); @@ -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); } |