Changes of Revision 2
[-] | Changed | Pound.spec |
1
2 %define pound_home %{_localstatedir}/lib/pound 3 4 Name: Pound 5 -Version: 2.4.4 6 +Version: 2.4.5 7 Release: 1%{?dist} 8 Summary: Reverse proxy and load balancer 9 10 |
||
[+] | Changed | Pound-2.4.5.tgz/CHANGELOG ^ |
@@ -1,4 +1,20 @@ ------------------------------------------------------------------------ +r61 | roseg | 2009-06-29 17:53:55 +0200 (Mon, 29 Jun 2009) | 13 lines + +Release 2.4.5 + +Stable release 2.4.5 + +Enhancements: + - log back-end killed/disabled/enabled (thanks to Joe Gooch and Jon Garvin) + - kill a BE on connection failure only if it has no HAport defined (thanks to Albert); the request may still fail! + +Bug fixes: + - fixed parantheses problems in need_rewrite (thanks to SBR) + - added call to free_headers in http.c (thanks to SBR) + - fixed maximal path length in UNIX domain sockets (thanks to Ricardo Gameiro) + +------------------------------------------------------------------------ r60 | roseg | 2009-01-14 17:39:52 +0100 (Wed, 14 Jan 2009) | 18 lines Release 2.4.4 | ||
[+] | Changed | Pound-2.4.5.tgz/config.c ^ |
@@ -140,10 +140,14 @@ res->addr.ai_socktype = SOCK_STREAM; res->addr.ai_family = AF_UNIX; res->addr.ai_protocol = 0; - if((res->addr.ai_addr = (struct sockaddr_un *)malloc(sizeof(struct sockaddr_un))) == NULL) { + if((res->addr.ai_addr = (struct sockaddr *)malloc(sizeof(struct sockaddr_un))) == NULL) { logmsg(LOG_ERR, "line %d: out of memory", n_lin); exit(1); } + if((strlen(lin + matches[1].rm_so) + 1) > UNIX_PATH_MAX) { + logmsg(LOG_ERR, "line %d: UNIX path name too long (greater than %d)", n_lin, UNIX_PATH_MAX - 1); + exit(1); + } res->addr.ai_addrlen = strlen(lin + matches[1].rm_so) + 1; res->addr.ai_addr->sa_family = AF_UNIX; strcpy(res->addr.ai_addr->sa_data, lin + matches[1].rm_so); | ||
[+] | Changed | Pound-2.4.5.tgz/configure ^ |
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for pound 2.4.4. +# Generated by GNU Autoconf 2.61 for pound 2.4.5. # # Report bugs to <roseg@apsis.ch>. # @@ -574,8 +574,8 @@ # Identity of this package. PACKAGE_NAME='pound' PACKAGE_TARNAME='pound' -PACKAGE_VERSION='2.4.4' -PACKAGE_STRING='pound 2.4.4' +PACKAGE_VERSION='2.4.5' +PACKAGE_STRING='pound 2.4.5' PACKAGE_BUGREPORT='roseg@apsis.ch' ac_unique_file="pound.c" @@ -1204,7 +1204,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pound 2.4.4 to adapt to many kinds of systems. +\`configure' configures pound 2.4.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1270,7 +1270,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pound 2.4.4:";; + short | recursive ) echo "Configuration of pound 2.4.5:";; esac cat <<\_ACEOF @@ -1366,7 +1366,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pound configure 2.4.4 +pound configure 2.4.5 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1380,7 +1380,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pound $as_me 2.4.4, which was +It was created by pound $as_me 2.4.5, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -7539,7 +7539,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pound $as_me 2.4.4, which was +This file was extended by pound $as_me 2.4.5, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7588,7 +7588,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -pound config.status 2.4.4 +pound config.status 2.4.5 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" | ||
[+] | Changed | Pound-2.4.5.tgz/http.c ^ |
@@ -487,8 +487,8 @@ int cl_11, be_11, res, chunked, n, sock, no_cont, skip, conn_closed, force_10, sock_proto; LISTENER *lstn; SERVICE *svc; - BACKEND *backend, *cur_backend; - struct addrinfo from_host; + BACKEND *backend, *cur_backend, *old_backend; + struct addrinfo from_host, z_addr; struct sockaddr_storage from_host_addr; BIO *cl, *be, *bb, *b64; X509 *x509; @@ -787,8 +787,18 @@ logmsg(LOG_WARNING, "(%lx) backend %s connect: %s", pthread_self(), buf, strerror(errno)); shutdown(sock, 2); close(sock); - kill_be(svc, backend, BE_KILL); - if((backend = get_backend(svc, &from_host, url, &headers[1])) == NULL) { + /* + * kill the back-end only if no HAport is defined for it + * otherwise allow the HAport mechanism to do its job + */ + memset(&z_addr, 0, sizeof(z_addr)); + if(memcmp(&(backend->ha_addr), &(z_addr), sizeof(z_addr)) == 0) + kill_be(svc, backend, BE_KILL); + /* + * ...but make sure we don't get into a loop with the same back-end + */ + old_backend = backend; + if((backend = get_backend(svc, &from_host, url, &headers[1])) == NULL || backend == old_backend) { addr2str(caddr, MAXBUF - 1, &from_host, 1); logmsg(LOG_NOTICE, "(%lx) e503 no back-end \"%s\" from %s", pthread_self(), request, caddr); err_reply(cl, h503, lstn->err503); @@ -888,6 +898,7 @@ logmsg(LOG_WARNING, "(%lx) e500 error write HTTPSHeader to %s: %s (%.3f sec)", pthread_self(), buf, strerror(errno), (end_req - start_req) / 1000000.0); err_reply(cl, h500, lstn->err500); + free_headers(headers); clean_all(); pthread_exit(NULL); } | ||
[+] | Changed | Pound-2.4.5.tgz/pound.8 ^ |
@@ -340,8 +340,8 @@ CHECKOUT, MERGE, REPORT). .IP .I 3 -additionally allow MS extensions WebDAV verbs (SUBSCRIBE, BPROPPATCH, -POLL, BMOVE, BCOPY, BDELETE, CONNECT). +additionally allow MS extensions WebDAV verbs (SUBSCRIBE, UNSUBSCRIBE, +NOTIFY, BPROPFIND, BPROPPATCH, POLL, BMOVE, BCOPY, BDELETE, CONNECT). .IP .I 4 additionally allow MS RPC extensions verbs (RPC_IN_DATA, RPC_OUT_DATA). | ||
[+] | Changed | Pound-2.4.5.tgz/pound.h ^ |
@@ -97,6 +97,11 @@ #error "Pound needs sys/un.h" #endif +#ifndef UNIX_PATH_MAX +/* on Linux this is defined in linux/un.h rather than sys/un.h - go figure */ +#define UNIX_PATH_MAX 108 +#endif + #if HAVE_NETINET_IN_H #include <netinet/in.h> #else | ||
[+] | Changed | Pound-2.4.5.tgz/poundctl.c ^ |
@@ -55,36 +55,36 @@ static char * prt_addr(const struct addrinfo *addr) { - static char res[64]; - char buf[64]; + static char res[UNIX_PATH_MAX]; + char buf[UNIX_PATH_MAX]; int port; void *src; - memset(buf, 0, 64); + memset(buf, 0, UNIX_PATH_MAX); #ifdef HAVE_INET_NTOP switch(addr->ai_family) { case AF_INET: src = (void *)&((struct sockaddr_in *)addr->ai_addr)->sin_addr.s_addr; port = ntohs(((struct sockaddr_in *)addr->ai_addr)->sin_port); - if(inet_ntop(AF_INET, src, buf, 63) == NULL) - strncpy(buf, "(UNKNOWN)", 63); + if(inet_ntop(AF_INET, src, buf, UNIX_PATH_MAX - 1) == NULL) + strncpy(buf, "(UNKNOWN)", UNIX_PATH_MAX - 1); break; case AF_INET6: src = (void *)&((struct sockaddr_in6 *)addr->ai_addr)->sin6_addr.s6_addr; port = ntohs(((struct sockaddr_in6 *)addr->ai_addr)->sin6_port); - if(inet_ntop(AF_INET6, src, buf, 63) == NULL) - strncpy(buf, "(UNKNOWN)", 63); + if(inet_ntop(AF_INET6, src, buf, UNIX_PATH_MAX - 1) == NULL) + strncpy(buf, "(UNKNOWN)", UNIX_PATH_MAX - 1); break; case AF_UNIX: - strncpy(buf, (char *)addr->ai_addr, 63); + strncpy(buf, (char *)addr->ai_addr, UNIX_PATH_MAX - 1); port = 0; break; default: - strncpy(buf, "(UNKNOWN)", 63); + strncpy(buf, "(UNKNOWN)", UNIX_PATH_MAX - 1); port = 0; break; } - snprintf(res, 63, "%s:%d", buf, port); + snprintf(res, UNIX_PATH_MAX - 1, "%s:%d", buf, port); #else #error "Pound needs inet_ntop()" #endif | ||
[+] | Changed | Pound-2.4.5.tgz/svc.c ^ |
@@ -558,6 +558,7 @@ { BACKEND *b; int ret_val; + char buf[MAXBUF]; if(ret_val = pthread_mutex_lock(&svc->mut)) logmsg(LOG_WARNING, "kill_be() lock: %s", strerror(ret_val)); @@ -567,12 +568,18 @@ switch(disable_mode) { case BE_DISABLE: b->disabled = 1; + str_be(buf, MAXBUF - 1, b); + logmsg(LOG_NOTICE, "(%lx) BackEnd %s disabled", pthread_self(), buf); break; case BE_KILL: b->alive = 0; + str_be(buf, MAXBUF - 1, b); + logmsg(LOG_NOTICE, "(%lx) BackEnd %s dead (killed)", pthread_self(), buf); t_clean(svc->sessions, &be, sizeof(be)); break; case BE_ENABLE: + str_be(buf, MAXBUF - 1, b); + logmsg(LOG_NOTICE, "(%lx) BackEnd %s enabled", pthread_self(), buf); b->disabled = 0; break; default: @@ -749,8 +756,8 @@ * check if the Location points to the Listener but with the wrong port or protocol */ if(memcmp(&be_addr.sin_addr.s_addr, &in_addr.sin_addr.s_addr, sizeof(in_addr.sin_addr.s_addr)) == 0 - && (memcmp(&be_addr.sin_port, &in_addr.sin_port, sizeof(in_addr.sin_port) != 0 - || strcasecmp(proto, (lstn->ctx == NULL)? "http": "https")))) { + && (memcmp(&be_addr.sin_port, &in_addr.sin_port, sizeof(in_addr.sin_port)) != 0 + || strcasecmp(proto, (lstn->ctx == NULL)? "http": "https"))) { free(addr.ai_addr); return 1; } @@ -761,8 +768,8 @@ * check if the Location points to the Listener but with the wrong port or protocol */ if(memcmp(&be6_addr.sin6_addr.s6_addr, &in6_addr.sin6_addr.s6_addr, sizeof(in6_addr.sin6_addr.s6_addr)) == 0 - && (memcmp(&be6_addr.sin6_port, &in6_addr.sin6_port, sizeof(in6_addr.sin6_port) != 0 - || strcasecmp(proto, (lstn->ctx == NULL)? "http": "https")))) { + && (memcmp(&be6_addr.sin6_port, &in6_addr.sin6_port, sizeof(in6_addr.sin6_port)) != 0 + || strcasecmp(proto, (lstn->ctx == NULL)? "http": "https"))) { free(addr.ai_addr); return 1; } @@ -1399,6 +1406,7 @@ write(a->control_sock, t->key, sz); return; } + IMPLEMENT_LHASH_DOALL_ARG_FN(t_dump, TABNODE *, void *) /* |