pound/2.5/dynamic-backends.patch
changeset 20 0f2a3cea40c9
parent 19 e12b21f08628
equal deleted inserted replaced
19:e12b21f08628 20:0f2a3cea40c9
     1 diff -r badbd0960f5b config.c
     1 diff -r badbd0960f5b config.c
     2 --- a/config.c	Mon May 09 11:00:36 2011 +0200
     2 --- a/config.c	Mon May 09 11:00:36 2011 +0200
     3 +++ b/config.c	Thu May 12 10:27:43 2011 +0200
     3 +++ b/config.c	Thu May 12 10:36:12 2011 +0200
     4 @@ -77,7 +77,7 @@
     4 @@ -77,7 +77,7 @@
     5  static regex_t  Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr;
     5  static regex_t  Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr;
     6  static regex_t  Redirect, RedirectN, TimeOut, Session, Type, TTL, ID, DynScale;
     6  static regex_t  Redirect, RedirectN, TimeOut, Session, Type, TTL, ID, DynScale;
     7  static regex_t  ClientCert, AddHeader, Ciphers, CAlist, VerifyList, CRLlist, NoHTTPS11;
     7  static regex_t  ClientCert, AddHeader, Ciphers, CAlist, VerifyList, CRLlist, NoHTTPS11;
     8 -static regex_t  Grace, Include, ConnTO, IgnoreCase, HTTPS, HTTPSCert;
     8 -static regex_t  Grace, Include, ConnTO, IgnoreCase, HTTPS, HTTPSCert;
    67      ) {
    67      ) {
    68          logmsg(LOG_ERR, "bad config Regex - aborted");
    68          logmsg(LOG_ERR, "bad config Regex - aborted");
    69          exit(1);
    69          exit(1);
    70 diff -r badbd0960f5b debian/changelog
    70 diff -r badbd0960f5b debian/changelog
    71 --- a/debian/changelog	Mon May 09 11:00:36 2011 +0200
    71 --- a/debian/changelog	Mon May 09 11:00:36 2011 +0200
    72 +++ b/debian/changelog	Thu May 12 10:27:43 2011 +0200
    72 +++ b/debian/changelog	Thu May 12 10:36:12 2011 +0200
    73 @@ -1,3 +1,15 @@
    73 @@ -1,3 +1,16 @@
    74 +pound (2.5-1~bpo50+3) lenny-backports; urgency=low
    74 +pound (2.5-1~bpo50+3) lenny-backports; urgency=low
    75 +
    75 +
    76 +  * fixed manpage formatting 
    76 +  * fixed manpage formatting 
    77 +
    77 +  * fixed unterminated strings 
    78 + -- Matthias Förste <foerste@schlittermann.de>  Wed, 11 May 2011 16:40:39 +0200
    78 +
       
    79 + -- Matthias Förste <foerste@schlittermann.de>  Thu, 12 May 2011 10:35:36 +0200
    79 +
    80 +
    80 +pound (2.5-1~bpo50+2) lenny-backports; urgency=low
    81 +pound (2.5-1~bpo50+2) lenny-backports; urgency=low
    81 +
    82 +
    82 +  * patched to deal with backend addresses on dynamic ips
    83 +  * patched to deal with backend addresses on dynamic ips
    83 +
    84 +
    86  pound (2.5-1~bpo50+1) lenny-backports; urgency=low
    87  pound (2.5-1~bpo50+1) lenny-backports; urgency=low
    87  
    88  
    88    * Rebuild for lenny-backports.
    89    * Rebuild for lenny-backports.
    89 diff -r badbd0960f5b http.c
    90 diff -r badbd0960f5b http.c
    90 --- a/http.c	Mon May 09 11:00:36 2011 +0200
    91 --- a/http.c	Mon May 09 11:00:36 2011 +0200
    91 +++ b/http.c	Thu May 12 10:27:43 2011 +0200
    92 +++ b/http.c	Thu May 12 10:36:12 2011 +0200
    92 @@ -773,6 +773,13 @@
    93 @@ -773,6 +773,13 @@
    93                  pthread_exit(NULL);
    94                  pthread_exit(NULL);
    94                  break;
    95                  break;
    95              }
    96              }
    96 +            if (backend->dyn_addr && upd_addr(backend->hostname, &backend->addr)) {
    97 +            if (backend->dyn_addr && upd_addr(backend->hostname, &backend->addr)) {
   103              if((sock = socket(sock_proto, SOCK_STREAM, 0)) < 0) {
   104              if((sock = socket(sock_proto, SOCK_STREAM, 0)) < 0) {
   104                  str_be(buf, MAXBUF - 1, backend);
   105                  str_be(buf, MAXBUF - 1, backend);
   105                  logmsg(LOG_WARNING, "(%lx) e503 backend %s socket create: %s", pthread_self(), buf, strerror(errno));
   106                  logmsg(LOG_WARNING, "(%lx) e503 backend %s socket create: %s", pthread_self(), buf, strerror(errno));
   106 diff -r badbd0960f5b pound.8
   107 diff -r badbd0960f5b pound.8
   107 --- a/pound.8	Mon May 09 11:00:36 2011 +0200
   108 --- a/pound.8	Mon May 09 11:00:36 2011 +0200
   108 +++ b/pound.8	Thu May 12 10:27:43 2011 +0200
   109 +++ b/pound.8	Thu May 12 10:36:12 2011 +0200
   109 @@ -682,6 +682,24 @@
   110 @@ -682,6 +682,24 @@
   110  .B Pound
   111  .B Pound
   111  uses the same address as the back-end server, but you may use a separate address
   112  uses the same address as the back-end server, but you may use a separate address
   112  if you wish. This directive applies only to non Unix-domain servers.
   113  if you wish. This directive applies only to non Unix-domain servers.
   113 +.TP
   114 +.TP
   131  .SH "Emergency"
   132  .SH "Emergency"
   132  The emergency server will be used once all existing back-ends are "dead".
   133  The emergency server will be used once all existing back-ends are "dead".
   133  All configuration directives enclosed between
   134  All configuration directives enclosed between
   134 diff -r badbd0960f5b pound.h
   135 diff -r badbd0960f5b pound.h
   135 --- a/pound.h	Mon May 09 11:00:36 2011 +0200
   136 --- a/pound.h	Mon May 09 11:00:36 2011 +0200
   136 +++ b/pound.h	Thu May 12 10:27:43 2011 +0200
   137 +++ b/pound.h	Thu May 12 10:36:12 2011 +0200
   137 @@ -308,6 +308,10 @@
   138 @@ -308,6 +308,10 @@
   138      int                 alive;      /* false if the back-end is dead */
   139      int                 alive;      /* false if the back-end is dead */
   139      int                 resurrect;  /* this back-end is to be resurrected */
   140      int                 resurrect;  /* this back-end is to be resurrected */
   140      int                 disabled;   /* true if the back-end is disabled */
   141      int                 disabled;   /* true if the back-end is disabled */
   141 +    int                 dyn_addr;     /* true if the address of the backend may change over time (dynamic ip for example) */
   142 +    int                 dyn_addr;     /* true if the address of the backend may change over time (dynamic ip for example) */
   152 +
   153 +
   153 +/* update address */
   154 +/* update address */
   154 +int upd_addr(char *hostname, struct addrinfo *ai);
   155 +int upd_addr(char *hostname, struct addrinfo *ai);
   155 diff -r badbd0960f5b svc.c
   156 diff -r badbd0960f5b svc.c
   156 --- a/svc.c	Mon May 09 11:00:36 2011 +0200
   157 --- a/svc.c	Mon May 09 11:00:36 2011 +0200
   157 +++ b/svc.c	Thu May 12 10:27:43 2011 +0200
   158 +++ b/svc.c	Thu May 12 10:36:12 2011 +0200
   158 @@ -904,6 +904,9 @@
   159 @@ -904,6 +904,9 @@
   159          default:
   160          default:
   160              continue;
   161              continue;
   161          }
   162          }
   162 +        if (be->dyn_ha_addr && upd_addr(be->ha_hostname, &be->ha_addr)) {
   163 +        if (be->dyn_ha_addr && upd_addr(be->ha_hostname, &be->ha_addr)) {