summaryrefslogtreecommitdiff
path: root/package/dsniff/patches/patch-arp_c
blob: f14b0482798e232c2f2c08c6d42bc828f90f6c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$Id$
--- dsniff-2.4.orig/arp.c	2001-03-15 09:32:58.000000000 +0100
+++ dsniff-2.4/arp.c	2007-01-23 00:20:48.000000000 +0100
@@ -39,7 +39,7 @@
 
 #ifdef BSD
 int
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
 {
 	int mib[6];
 	size_t len;
@@ -91,7 +91,7 @@ arp_cache_lookup(in_addr_t ip, struct et
 #endif
 
 int
-arp_cache_lookup(in_addr_t ip, struct ether_addr *ether)
+arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif)
 {
 	int sock;
 	struct arpreq ar;
@@ -99,7 +99,7 @@ arp_cache_lookup(in_addr_t ip, struct et
 	
 	memset((char *)&ar, 0, sizeof(ar));
 #ifdef __linux__
-	strncpy(ar.arp_dev, "eth0", sizeof(ar.arp_dev));   /* XXX - *sigh* */
+	strncpy(ar.arp_dev, lif, strlen(lif));
 #endif
 	sin = (struct sockaddr_in *)&ar.arp_pa;
 	sin->sin_family = AF_INET;