diff -r 7ce365612e43 -r e12b21f08628 pound/2.5/dynamic-backends.patch --- a/pound/2.5/dynamic-backends.patch Wed May 11 16:08:37 2011 +0200 +++ b/pound/2.5/dynamic-backends.patch Thu May 12 10:34:58 2011 +0200 @@ -1,6 +1,6 @@ diff -r badbd0960f5b config.c --- a/config.c Mon May 09 11:00:36 2011 +0200 -+++ b/config.c Wed May 11 16:04:14 2011 +0200 ++++ b/config.c Thu May 12 10:27:43 2011 +0200 @@ -77,7 +77,7 @@ static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr; static regex_t Redirect, RedirectN, TimeOut, Session, Type, TTL, ID, DynScale; @@ -23,9 +23,9 @@ lin[strlen(lin) - 1] = '\0'; if(!regexec(&Address, lin, 4, matches, 0)) { lin[matches[1].rm_eo] = '\0'; -+ if((res->hostname = (char *)malloc(matches[1].rm_eo - matches[1].rm_so)) == NULL) ++ if((res->hostname = (char *)malloc(matches[1].rm_eo - matches[1].rm_so + 1)) == NULL) + conf_err("out of memory"); -+ memcpy(res->hostname, lin + matches[1].rm_so, matches[1].rm_eo - matches[1].rm_so); ++ memcpy(res->hostname, lin + matches[1].rm_so, matches[1].rm_eo - matches[1].rm_so + 1); if(get_host(lin + matches[1].rm_so, &res->addr)) { /* if we can't resolve it assume this is a UNIX domain socket */ res->addr.ai_socktype = SOCK_STREAM; @@ -41,9 +41,9 @@ if(is_emergency) conf_err("HAportAddr is not supported for Emergency back-ends"); lin[matches[1].rm_eo] = '\0'; -+ if((res->ha_hostname = (char *)malloc(matches[1].rm_eo - matches[1].rm_so)) == NULL) ++ if((res->ha_hostname = (char *)malloc(matches[1].rm_eo - matches[1].rm_so + 1)) == NULL) + conf_err("out of memory"); -+ memcpy(res->ha_hostname, lin + matches[1].rm_so, matches[1].rm_eo - matches[1].rm_so); ++ memcpy(res->ha_hostname, lin + matches[1].rm_so, matches[1].rm_eo - matches[1].rm_so + 1); if(get_host(lin + matches[1].rm_so, &res->ha_addr)) { /* if we can't resolve it assume this is a UNIX domain socket */ res->addr.ai_socktype = SOCK_STREAM; @@ -69,8 +69,14 @@ exit(1); diff -r badbd0960f5b debian/changelog --- a/debian/changelog Mon May 09 11:00:36 2011 +0200 -+++ b/debian/changelog Wed May 11 16:04:14 2011 +0200 -@@ -1,3 +1,9 @@ ++++ b/debian/changelog Thu May 12 10:27:43 2011 +0200 +@@ -1,3 +1,15 @@ ++pound (2.5-1~bpo50+3) lenny-backports; urgency=low ++ ++ * fixed manpage formatting ++ ++ -- Matthias Förste Wed, 11 May 2011 16:40:39 +0200 ++ +pound (2.5-1~bpo50+2) lenny-backports; urgency=low + + * patched to deal with backend addresses on dynamic ips @@ -82,7 +88,7 @@ * Rebuild for lenny-backports. diff -r badbd0960f5b http.c --- a/http.c Mon May 09 11:00:36 2011 +0200 -+++ b/http.c Wed May 11 16:04:14 2011 +0200 ++++ b/http.c Thu May 12 10:27:43 2011 +0200 @@ -773,6 +773,13 @@ pthread_exit(NULL); break; @@ -99,11 +105,12 @@ logmsg(LOG_WARNING, "(%lx) e503 backend %s socket create: %s", pthread_self(), buf, strerror(errno)); diff -r badbd0960f5b pound.8 --- a/pound.8 Mon May 09 11:00:36 2011 +0200 -+++ b/pound.8 Wed May 11 16:04:14 2011 +0200 -@@ -682,6 +682,22 @@ ++++ b/pound.8 Thu May 12 10:27:43 2011 +0200 +@@ -682,6 +682,24 @@ .B Pound uses the same address as the back-end server, but you may use a separate address if you wish. This directive applies only to non Unix-domain servers. ++.TP +\fBDynamicAddress\fR +If this directive is present then the +.I Address @@ -113,6 +120,7 @@ +to that +.I Address +is made. ++.TP +\fBDynamicHAAddress\fR +This is the same as +.I DynamicAddress @@ -125,7 +133,7 @@ All configuration directives enclosed between diff -r badbd0960f5b pound.h --- a/pound.h Mon May 09 11:00:36 2011 +0200 -+++ b/pound.h Wed May 11 16:04:14 2011 +0200 ++++ b/pound.h Thu May 12 10:27:43 2011 +0200 @@ -308,6 +308,10 @@ int alive; /* false if the back-end is dead */ int resurrect; /* this back-end is to be resurrected */ @@ -146,7 +154,7 @@ +int upd_addr(char *hostname, struct addrinfo *ai); diff -r badbd0960f5b svc.c --- a/svc.c Mon May 09 11:00:36 2011 +0200 -+++ b/svc.c Wed May 11 16:04:14 2011 +0200 ++++ b/svc.c Thu May 12 10:27:43 2011 +0200 @@ -904,6 +904,9 @@ default: continue;