update libdaemon to new upstream release (v0.10)
[openwrt.git] / openwrt / package / dsniff / patches / arpspoof-fix.patch
1 diff -Nur dsniff-2.3.orig/arp.c dsniff-2.3/arp.c
2 --- dsniff-2.3.orig/arp.c 2000-11-14 16:51:03.000000000 +0100
3 +++ dsniff-2.3/arp.c 2005-09-12 16:13:44.101915800 +0200
4 @@ -37,7 +37,7 @@
5 #ifdef BSD
6
7 int
8 -arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
9 +arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char* linf)
10 {
11 int mib[6];
12 size_t len;
13 @@ -89,7 +89,7 @@
14 #endif
15
16 int
17 -arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
18 +arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char* lif)
19 {
20 int sock;
21 struct arpreq ar;
22 @@ -97,7 +97,7 @@
23
24 memset((char *)&ar, 0, sizeof(ar));
25 #ifdef __linux__
26 - strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev)); /* XXX - *sigh* */
27 + strncpy(ar.arp_dev, lif, strlen(lif));
28 #endif
29 sin = (struct sockaddr_in *)&ar.arp_pa;
30 sin->sin_family = AF_INET;
31 diff -Nur dsniff-2.3.orig/arpspoof.c dsniff-2.3/arpspoof.c
32 --- dsniff-2.3.orig/arpspoof.c 2000-11-28 08:43:43.000000000 +0100
33 +++ dsniff-2.3/arpspoof.c 2005-09-12 16:16:49.244769808 +0200
34 @@ -23,7 +23,7 @@
35 #include "version.h"
36
37 extern char *ether_ntoa(struct ether_addr *);
38 -extern int arp_cache_lookup(in_addr_t, struct ether_addr *);
39 +extern int arp_cache_lookup(in_addr_t, struct ether_addr *, const char* intf);
40
41 static struct libnet_link_int *llif;
42 static struct ether_addr spoof_mac, target_mac;
43 @@ -111,7 +111,7 @@
44 int i = 0;
45
46 do {
47 - if (arp_cache_lookup(ip, mac) == 0)
48 + if (arp_cache_lookup(ip, mac, intf) == 0)
49 return (1);
50 #ifdef __linux__
51 /* XXX - force the kernel to arp. feh. */
This page took 0.052073 seconds and 5 git commands to generate.