mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-02 13:04:42 +01:00
f706b0bc33
Thanks to USUARIONUEVO for the report Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
56 lines
1.4 KiB
Diff
56 lines
1.4 KiB
Diff
Author: Steve Kemp <skx@debian.org>
|
|
Description: Work with multiple interfaces.
|
|
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=242369
|
|
---
|
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
|
|
--- a/arp.c
|
|
+++ b/arp.c
|
|
@@ -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* linf)
|
|
{
|
|
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;
|
|
--- a/arp.h
|
|
+++ b/arp.h
|
|
@@ -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* linf);
|
|
|
|
#endif /* _ARP_H_ */
|
|
--- a/arpspoof.c
|
|
+++ b/arpspoof.c
|
|
@@ -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. */
|