mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-20 21:49:55 +02:00
7767a2806b
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3298 3c298f89-4303-0410-b956-a3cf2f4a3e73
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
diff -urN dsniff.old/arp.c dsniff.dev/arp.c
|
|
--- dsniff.old/arp.c 2001-03-15 09:32:58.000000000 +0100
|
|
+++ dsniff.dev/arp.c 2006-03-03 01:41:10.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 @@
|
|
#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 @@
|
|
|
|
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;
|
|
diff -urN dsniff.old/arp.h dsniff.dev/arp.h
|
|
--- dsniff.old/arp.h 2001-03-15 09:27:08.000000000 +0100
|
|
+++ dsniff.dev/arp.h 2006-03-03 01:42:23.000000000 +0100
|
|
@@ -11,6 +11,6 @@
|
|
#ifndef _ARP_H_
|
|
#define _ARP_H_
|
|
|
|
-int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether);
|
|
+int arp_cache_lookup(in_addr_t ip, struct ether_addr *ether, const char *lif);
|
|
|
|
#endif /* _ARP_H_ */
|
|
diff -urN dsniff.old/arpspoof.c dsniff.dev/arpspoof.c
|
|
--- dsniff.old/arpspoof.c 2001-03-15 09:32:58.000000000 +0100
|
|
+++ dsniff.dev/arpspoof.c 2006-03-03 01:42:00.000000000 +0100
|
|
@@ -113,7 +113,7 @@
|
|
int i = 0;
|
|
|
|
do {
|
|
- if (arp_cache_lookup(ip, mac) == 0)
|
|
+ if (arp_cache_lookup(ip, mac, intf) == 0)
|
|
return (1);
|
|
#ifdef __linux__
|
|
/* XXX - force the kernel to arp. feh. */
|