From: hno <> Date: Sun, 7 Nov 2004 04:57:53 +0000 (+0000) Subject: Bug #909: ARP Support on FreeBSD X-Git-Tag: SQUID_3_0_PRE4~1004 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09f64260ea159ab760e76d97d847102935679dbc;p=thirdparty%2Fsquid.git Bug #909: ARP Support on FreeBSD From Guido Serassio 2004-10-23 14:57 The new FreeBSD code doesn't build. There are some C++ problems, and the Solaris section seems to be affected too. --- diff --git a/src/ACLARP.cc b/src/ACLARP.cc index bf3f1fc987..6cee301623 100644 --- a/src/ACLARP.cc +++ b/src/ACLARP.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLARP.cc,v 1.6 2004/10/17 22:13:03 hno Exp $ + * $Id: ACLARP.cc,v 1.7 2004/11/06 21:57:53 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -35,6 +35,7 @@ */ #include "config.h" +#include "squid.h" #ifdef _SQUID_SOLARIS_ #include @@ -49,14 +50,13 @@ #endif #include #include -#ifdef _SQUID_FREEBSD__ +#ifdef _SQUID_FREEBSD_ #include #endif #if HAVE_NETINET_IF_ETHER_H #include #endif -#include "squid.h" #include "ACLARP.h" #if !USE_ARP_ACL @@ -375,14 +375,6 @@ aclMatchArp(SplayNode **dataptr, struct in_addr c) struct sockaddr_in ipAddr; - unsigned char ifbuffer[sizeof(struct ifreq) * 64]; - - struct ifconf ifc; - - struct ifreq *ifr; - - int offset; - SplayNode **Top = dataptr; /* @@ -418,7 +410,7 @@ aclMatchArp(SplayNode **dataptr, struct in_addr c) arpReq.arp_ha.sa_data[4] & 0xff, arpReq.arp_ha.sa_data[5] & 0xff); /* Do lookup */ - *Top = (*Top)->splay(&arpReq.arp_ha.sa_data, aclArpCompare); + *Top = (*Top)->splay((acl_arp_data *)&arpReq.arp_ha.sa_data, aclArpCompare); debug(28, 3) ("aclMatchArp: '%s' %s\n", inet_ntoa(c), splayLastResult ? "NOT found" : "found"); @@ -432,14 +424,6 @@ aclMatchArp(SplayNode **dataptr, struct in_addr c) struct sockaddr_in ipAddr; - unsigned char ifbuffer[sizeof(struct ifreq) * 64]; - - struct ifconf ifc; - - struct ifreq *ifr; - - int offset; - SplayNode **Top = dataptr; int mib[6]; @@ -485,7 +469,7 @@ aclMatchArp(SplayNode **dataptr, struct in_addr c) return 0; } - if ((buf = xmalloc(needed)) == NULL) { + if ((buf = (char *)xmalloc(needed)) == NULL) { debug(28, 0) ("Can't allocate temporary ARP table!\n"); return 0; } @@ -533,7 +517,7 @@ aclMatchArp(SplayNode **dataptr, struct in_addr c) arpReq.arp_ha.sa_data[4] & 0xff, arpReq.arp_ha.sa_data[5] & 0xff); /* Do lookup */ - *Top = (*Top)->splay(&arpReq.arp_ha.sa_data, aclArpCompare); + *Top = (*Top)->splay((acl_arp_data *)&arpReq.arp_ha.sa_data, aclArpCompare); debug(28, 3) ("aclMatchArp: '%s' %s\n", inet_ntoa(c), splayLastResult ? "NOT found" : "found");