d0ea47a3ae
This patch updates parprouted from 0.64 to 0.7. This fixes some bugs and adds support for hosts moving across Ethernet interfaces. Built and tested on a WNDR3700v2. Signed-off-by: Tristan Schmelcher <tristan_schmelcher@alumni.uwaterloo.ca> git-svn-id: svn://svn.openwrt.org/openwrt/packages@40577 3c298f89-4303-0410-b956-a3cf2f4a3e73
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
--- a/arp.c
|
|
+++ b/arp.c
|
|
@@ -366,7 +366,7 @@ void *arp(char *ifname)
|
|
do {
|
|
pthread_testcancel();
|
|
/* Sleep a bit in order not to overload the system */
|
|
- usleep(300);
|
|
+ usleep(3000);
|
|
|
|
if (arp_recv(sock, &frame) <= 0)
|
|
continue;
|
|
--- a/parprouted.c
|
|
+++ b/parprouted.c
|
|
@@ -106,7 +106,7 @@ int route_remove(ARPTAB_ENTRY* cur_entry
|
|
int success = 1;
|
|
|
|
if (snprintf(routecmd_str, ROUTE_CMD_LEN-1,
|
|
- "/sbin/ip route del %s/32 metric 50 dev %s scope link",
|
|
+ "/sbin/route del -host %s metric 50 dev %s",
|
|
inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1)
|
|
{
|
|
syslog(LOG_INFO, "ip route command too large to fit in buffer!");
|
|
@@ -136,7 +136,7 @@ int route_add(ARPTAB_ENTRY* cur_entry)
|
|
int success = 1;
|
|
|
|
if (snprintf(routecmd_str, ROUTE_CMD_LEN-1,
|
|
- "/sbin/ip route add %s/32 metric 50 dev %s scope link",
|
|
+ "/sbin/route add -host %s metric 50 dev %s",
|
|
inet_ntoa(cur_entry->ipaddr_ia), cur_entry->ifname) > ROUTE_CMD_LEN-1)
|
|
{
|
|
syslog(LOG_INFO, "ip route command too large to fit in buffer!");
|