1 --- a/lib/arprefresh/src/olsrd_arprefresh.c
2 +++ b/lib/arprefresh/src/olsrd_arprefresh.c
4 * Plugin to refresh the local ARP cache from received OLSR broadcasts
7 +#undef ARPREFRESH_DEBUG
13 #include <netinet/ip.h>
14 #include <netinet/udp.h>
15 #include <netpacket/packet.h>
16 +#ifdef ARPREFRESH_DEBUG
17 +#include <arpa/inet.h>
19 #include <linux/types.h>
20 #include <linux/filter.h>
23 #include "kernel_routes.h"
24 #include "scheduler.h"
26 -#undef ARPREFRESH_DEBUG
27 #define PLUGIN_INTERFACE_VERSION 5
29 /****************************************************************************
31 memcpy(&req.in_pa.sin_addr, &buf.ip.saddr, sizeof(buf.ip.saddr));
32 req.arp.arp_ha.sa_family = AF_LOCAL;
33 memcpy(&req.arp.arp_ha.sa_data, &buf.eth.h_source, sizeof(buf.eth.h_source));
34 - req.arp.arp_flags = ATF_COM;
36 + * Currently, temp arp entries work partially under linux-2.6 (the entries
37 + * are timed out after a short period, not after the default 5 minutes. Under
38 + * linux 2.4 this does not work. The ATF_MAGIC triggers a hack in the Freifunk
39 + * firmware's kernel. ATF_MACIG seem not to be used anywhere...
41 + req.arp.arp_flags = ATF_COM | ATF_MAGIC;
42 if_indextoname(from.sll_ifindex, req.arp.arp_dev);
43 #ifdef ARPREFRESH_DEBUG