1 diff -Nur olsrd-0.5.6-r2.orig/lib/arprefresh/src/olsrd_arprefresh.c olsrd-0.5.6-r2/lib/arprefresh/src/olsrd_arprefresh.c
2 --- olsrd-0.5.6-r2.orig/lib/arprefresh/src/olsrd_arprefresh.c 2008-11-26 10:54:16.000000000 +0100
3 +++ olsrd-0.5.6-r2/lib/arprefresh/src/olsrd_arprefresh.c 2008-11-26 10:56:15.000000000 +0100
5 * Plugin to refresh the local ARP cache from received OLSR broadcasts
8 +#undef ARPREFRESH_DEBUG
14 #include <netinet/ip.h>
15 #include <netinet/udp.h>
16 #include <netpacket/packet.h>
17 +#ifdef ARPREFRESH_DEBUG
18 +#include <arpa/inet.h>
20 #include <linux/types.h>
21 #include <linux/filter.h>
24 #include "kernel_routes.h"
25 #include "scheduler.h"
27 -#undef ARPREFRESH_DEBUG
28 #define PLUGIN_INTERFACE_VERSION 5
30 /****************************************************************************
32 memcpy(&req.in_pa.sin_addr, &buf.ip.saddr, sizeof(buf.ip.saddr));
33 req.arp.arp_ha.sa_family = AF_LOCAL;
34 memcpy(&req.arp.arp_ha.sa_data, &buf.eth.h_source, sizeof(buf.eth.h_source));
35 - req.arp.arp_flags = ATF_COM;
37 + * Currently, temp arp entries work partially under linux-2.6 (the entries
38 + * are timed out after a short period, not after the default 5 minutes. Under
39 + * linux 2.4 this does not work. The ATF_MAGIC triggers a hack in the Freifunk
40 + * firmware's kernel. ATF_MACIG seem not to be used anywhere...
42 + req.arp.arp_flags = ATF_COM | ATF_MAGIC;
43 if_indextoname(from.sll_ifindex, req.arp.arp_dev);
44 #ifdef ARPREFRESH_DEBUG