patch-arp_c 877 B

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