mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-24 06:56:41 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
13c1365e46
@ -3,7 +3,7 @@ env:
|
||||
|
||||
freebsd_13_task:
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-0
|
||||
image_family: freebsd-13-2
|
||||
install_script:
|
||||
- pkg install -y autoconf automake
|
||||
- ./package/setup-configure
|
||||
|
@ -1308,7 +1308,7 @@ AddrsMatch(char *addr1, char *addr2)
|
||||
{
|
||||
#if USE_IPV6
|
||||
int error, ret = 0;
|
||||
struct addrinfo *ai1, *ai2, hints;
|
||||
struct addrinfo *ai1, *ai2, *rp1, *rp2, hints;
|
||||
#else
|
||||
/* so, since we might use inet_addr, we're going to use
|
||||
* (in_addr_t)(-1) as a sign of an invalid ip address.
|
||||
@ -1346,17 +1346,19 @@ AddrsMatch(char *addr1, char *addr2)
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (; ai1 != NULL; ai1 = ai1->ai_next) {
|
||||
for (; ai2 != NULL; ai2 = ai2->ai_next) {
|
||||
if (ai1->ai_addr->sa_family != ai2->ai_addr->sa_family)
|
||||
rp1 = ai1;
|
||||
rp2 = ai2;
|
||||
for (; rp1 != NULL; rp1 = rp1->ai_next) {
|
||||
for (; rp2 != NULL; rp2 = rp2->ai_next) {
|
||||
if (rp1->ai_addr->sa_family != rp2->ai_addr->sa_family)
|
||||
continue;
|
||||
|
||||
if (
|
||||
# if HAVE_MEMCMP
|
||||
memcmp(&ai1->ai_addr, &ai2->ai_addr,
|
||||
memcmp(&rp1->ai_addr, &rp2->ai_addr,
|
||||
sizeof(struct sockaddr_storage))
|
||||
# else
|
||||
bcmp(&ai1->ai_addr, &ai2->ai_addr,
|
||||
bcmp(&rp1->ai_addr, &rp2->ai_addr,
|
||||
sizeof(struct sockaddr_storage))
|
||||
# endif
|
||||
== 0) {
|
||||
|
@ -708,7 +708,7 @@ FileUnopen(CONSFILE *cfp)
|
||||
break;
|
||||
#if HAVE_OPENSSL
|
||||
case SSLSocket:
|
||||
retval = -1;
|
||||
retval = cfp->fd;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
|
@ -53,8 +53,8 @@ int fAll = 0, fNoinit = 0, fVersion = 0, fStrip = 0, fReopen =
|
||||
char *pcConfig = CONFIGFILE;
|
||||
int cMaxMemb = MAXMEMB;
|
||||
#if USE_IPV6
|
||||
struct addrinfo *bindAddr;
|
||||
struct addrinfo *bindBaseAddr;
|
||||
struct addrinfo *bindAddr = (struct addrinfo *)0;
|
||||
struct addrinfo *bindBaseAddr = (struct addrinfo *)0;
|
||||
#else
|
||||
in_addr_t bindAddr = INADDR_ANY;
|
||||
unsigned short bindPort;
|
||||
@ -781,7 +781,9 @@ DestroyDataStructures(void)
|
||||
|
||||
#if USE_IPV6
|
||||
/* clean up addrinfo stucts */
|
||||
if ((struct addrinfo *)0 != bindAddr)
|
||||
freeaddrinfo(bindAddr);
|
||||
if ((struct addrinfo *)0 != bindBaseAddr)
|
||||
freeaddrinfo(bindBaseAddr);
|
||||
#else
|
||||
if (myAddrs != (struct in_addr *)0)
|
||||
|
Loading…
Reference in New Issue
Block a user