static void host_entry_timeout(struct uloop_timeout *timeout)
{
struct relayd_host *host = container_of(timeout, struct relayd_host, timeout);
+ struct relayd_interface *rif;
/*
* When a host is behind a managed interface, we must not expire its host
* giving up on it.
*/
if (host->rif->managed && host->cleanup_pending < host_ping_tries) {
- send_arp_request(host->rif, host->ipaddr);
+ list_for_each_entry(rif, &interfaces, list) {
+ send_arp_request(rif, host->ipaddr);
+ }
host->cleanup_pending++;
uloop_timeout_set(&host->timeout, 1000);
return;
if (!memcmp(pkt->arp.arp_spa, "\x00\x00\x00\x00", 4))
return;
+ host = find_host_by_ipaddr(NULL, pkt->arp.arp_spa);
+ if (!host || host->rif != rif)
+ relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa);
+
if (local_route_table && !memcmp(pkt->arp.arp_tpa, local_addr, sizeof(local_addr))) {
send_arp_reply(rif, local_addr, pkt->arp.arp_sha, pkt->arp.arp_spa);
return;
}
- host = find_host_by_ipaddr(NULL, pkt->arp.arp_spa);
- if (!host || host->rif != rif)
- relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa);
-
host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa);
/*
local_route_table = 0;
uloop_init();
- while ((ch = getopt(argc, argv, "I:i:t:BDdT:G:R:L:")) != -1) {
+ while ((ch = getopt(argc, argv, "I:i:t:p:BDdT:G:R:L:")) != -1) {
switch(ch) {
case 'I':
managed = true;