]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
farp: Fix incompatible function types warning
authorTobias Brunner <tobias@strongswan.org>
Wed, 17 Nov 2021 17:21:30 +0000 (18:21 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 17 Nov 2021 17:21:30 +0000 (18:21 +0100)
src/libcharon/plugins/farp/farp_spoofer.c

index 2a1b511c31e39d684c2287bf84b334a50d653864..2476b018ddcba9f982cc46e8aef48403f39e108b 100644 (file)
@@ -139,10 +139,8 @@ static void send_arp(private_farp_spoofer_t *this,
        }
 }
 
-/**
- * ARP request receiving
- */
-static bool receive_arp(private_farp_spoofer_t *this)
+CALLBACK(receive_arp, bool,
+       private_farp_spoofer_t *this, int fd, watcher_event_t event)
 {
        struct sockaddr_ll addr;
        socklen_t addr_len = sizeof(addr);
@@ -227,8 +225,7 @@ farp_spoofer_t *farp_spoofer_create(farp_listener_t *listener)
                return NULL;
        }
 
-       lib->watcher->add(lib->watcher, this->skt, WATCHER_READ,
-                                         (watcher_cb_t)receive_arp, this);
+       lib->watcher->add(lib->watcher, this->skt, WATCHER_READ, receive_arp, this);
 
        return &this->public;
 }