~ubuntu-branches/ubuntu/utopic/haproxy/utopic-proposed

« back to all changes in this revision

Viewing changes to include/types/proxy.h

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat, Apollon Oikonomopoulos, Vincent Bernat, Prach Pongpanich
  • Date: 2013-05-06 20:02:14 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20130506200214-36s6p81fsa5zqybt
Tags: 1.4.23-1
[ Apollon Oikonomopoulos ]
* New upstream version (Closes: #643650, #678953)
   + This fixes CVE-2012-2942 (Closes: #674447)
   + This fixes CVE-2013-1912 (Closes: #704611)
* Ship vim addon as vim-haproxy (Closes: #702893)
* Check for the configuration file after sourcing /etc/default/haproxy
  (Closes: #641762)
* Use /dev/log for logging by default (Closes: #649085)

[ Vincent Bernat ]
* debian/control:
   + add Vcs-* fields
   + switch maintenance to Debian HAProxy team. (Closes: #706890)
   + drop dependency to quilt: 3.0 (quilt) format is in use.
* debian/rules:
   + don't explicitly call dh_installchangelog.
   + use dh_installdirs to install directories.
   + use dh_install to install error and configuration files.
   + switch to `linux2628` Makefile target for Linux.
* debian/postrm:
   + remove haproxy user and group on purge.
* Ship a more minimal haproxy.cfg file: no `listen` blocks but `global`
  and `defaults` block with appropriate configuration to use chroot and
  logging in the expected way.

[ Prach Pongpanich ]
* debian/copyright:
   + add missing copyright holders
   + update years of copyright
* debian/rules:
   + build with -Wl,--as-needed to get rid of unnecessary depends
* Remove useless files in debian/haproxy.{docs,examples}
* Update debian/watch file, thanks to Bart Martens

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
/* bits for proxy->options */
72
72
#define PR_O_REDISP     0x00000001      /* allow reconnection to dispatch in case of errors */
73
73
#define PR_O_TRANSP     0x00000002      /* transparent mode : use original DEST as dispatch */
74
 
#define PR_O_COOK_RW    0x00000004      /* rewrite all direct cookies with the right serverid */
75
 
#define PR_O_COOK_IND   0x00000008      /* keep only indirect cookies */
76
 
#define PR_O_COOK_INS   0x00000010      /* insert cookies when not accessing a server directly */
77
 
#define PR_O_COOK_PFX   0x00000020      /* rewrite all cookies by prefixing the right serverid */
78
 
#define PR_O_COOK_ANY   (PR_O_COOK_RW | PR_O_COOK_IND | PR_O_COOK_INS | PR_O_COOK_PFX)
 
74
/* unused: 0x04, 0x08, 0x10, 0x20 */
79
75
#define PR_O_SMTP_CHK   0x00000040      /* use SMTP EHLO check for server health - pvandijk@vision6.com.au */
80
76
#define PR_O_KEEPALIVE  0x00000080      /* follow keep-alive sessions */
81
 
#define PR_O_FWDFOR     0x00000100      /* insert x-forwarded-for with client address */
 
77
#define PR_O_FWDFOR     0x00000100      /* conditionally insert x-forwarded-for with client address */
82
78
#define PR_O_BIND_SRC   0x00000200      /* bind to a specific source address when connect()ing */
83
79
#define PR_O_NULLNOLOG  0x00000400      /* a connect without request will not be logged */
84
 
#define PR_O_COOK_NOC   0x00000800      /* add a 'Cache-control' header with the cookie */
85
 
#define PR_O_COOK_POST  0x00001000      /* don't insert cookies for requests other than a POST */
 
80
/* unused: 0x0800, 0x1000 */
86
81
#define PR_O_HTTP_CHK   0x00002000      /* use HTTP 'OPTIONS' method to check server health */
87
82
#define PR_O_PERSIST    0x00004000      /* server persistence stays effective even when server is down */
88
83
#define PR_O_LOGASAP    0x00008000      /* log as soon as possible, without waiting for the session to complete */
148
143
#define PR_O2_EXP_RSTR  0x02000000      /* http-check expect rstring */
149
144
#define PR_O2_EXP_TYPE  0x03800000      /* mask for http-check expect type */
150
145
#define PR_O2_EXP_INV   0x04000000      /* http-check expect !<rule> */
151
 
#define PR_O2_COOK_PSV  0x08000000      /* cookie ... preserve */
 
146
/* unused: 0x08000000, 0x10000000 */
 
147
#define PR_O2_FF_ALWAYS 0x20000000      /* always set x-forwarded-for */
 
148
#define PR_O2_NODELAY   0x40000000      /* fully interactive mode, never delay outgoing data */
152
149
/* end of proxy->options2 */
153
150
 
 
151
/* Cookie settings for pr->ck_opts */
 
152
#define PR_CK_RW        0x00000001      /* rewrite all direct cookies with the right serverid */
 
153
#define PR_CK_IND       0x00000002      /* keep only indirect cookies */
 
154
#define PR_CK_INS       0x00000004      /* insert cookies when not accessing a server directly */
 
155
#define PR_CK_PFX       0x00000008      /* rewrite all cookies by prefixing the right serverid */
 
156
#define PR_CK_ANY       (PR_CK_RW | PR_CK_IND | PR_CK_INS | PR_CK_PFX)
 
157
#define PR_CK_NOC       0x00000010      /* add a 'Cache-control' header with the cookie */
 
158
#define PR_CK_POST      0x00000020      /* don't insert cookies for requests other than a POST */
 
159
#define PR_CK_PSV       0x00000040      /* cookie ... preserve */
 
160
#define PR_CK_HTTPONLY  0x00000080      /* emit the "HttpOnly" attribute */
 
161
#define PR_CK_SECURE    0x00000100      /* emit the "Secure" attribute */
 
162
 
154
163
/* bits for sticking rules */
155
164
#define STK_IS_MATCH    0x00000001      /* match on request fetch */
156
165
#define STK_IS_STORE    0x00000002      /* store on request fetch */
176
185
        int state;                              /* proxy state */
177
186
        int options;                            /* PR_O_REDISP, PR_O_TRANSP, ... */
178
187
        int options2;                           /* PR_O2_* */
 
188
        unsigned int ck_opts;                   /* PR_CK_* (cookie options) */
179
189
        unsigned int fe_req_ana, be_req_ana;    /* bitmap of common request protocol analysers for the frontend and backend */
180
190
        unsigned int fe_rsp_ana, be_rsp_ana;    /* bitmap of common response protocol analysers for the frontend and backend */
181
191
        int mode;                               /* mode = PR_MODE_TCP, PR_MODE_HTTP or PR_MODE_HEALTH */
212
222
        unsigned url_param_post_limit;          /* if checking POST body for URI parameter, max body to wait for */
213
223
        int  uri_len_limit;                     /* character limit for uri balancing algorithm */
214
224
        int  uri_dirs_depth1;                   /* directories+1 (slashes) limit for uri balancing algorithm */
 
225
        int  uri_whole;                         /* if != 0, calculates the hash from the whole uri. Still honors the len_limit and dirs_depth1 */
215
226
        char *hh_name;                          /* name of the header parameter used for hashing */
216
227
        int  hh_len;                            /* strlen(hh_name), computed only once */
217
228
        int  hh_match_domain;                   /* toggle use of special match function */
255
266
        int fwdfor_hdr_len;                     /* length of "x-forwarded-for" header */
256
267
        char *orgto_hdr_name;                   /* header to use - default: "x-original-to" */
257
268
        int orgto_hdr_len;                      /* length of "x-original-to" header */
 
269
        char *server_id_hdr_name;                   /* the header to use to send the server id (name) */
 
270
        int server_id_hdr_len;                      /* the length of the id (name) header... name */
258
271
 
259
272
        unsigned down_trans;                    /* up-down transitions */
260
273
        unsigned down_time;                     /* total time the proxy was down */
294
307
        int grace;                              /* grace time after stop request */
295
308
        char *check_req;                        /* HTTP or SSL request to use for PR_O_HTTP_CHK|PR_O_SSL3_CHK */
296
309
        int check_len;                          /* Length of the HTTP or SSL3 request */
297
 
        char *expect_str;                       /* http-check expected content */
 
310
        char *expect_str;                       /* http-check expected content : string or text version of the regex */
298
311
        regex_t *expect_regex;                  /* http-check expected content */
299
312
        struct chunk errmsg[HTTP_ERR_SIZE];     /* default or customized error messages for known errors */
300
313
        int uuid;                               /* universally unique proxy ID, used for SNMP */
307
320
        int no_options2;                        /* PR_O2_* */
308
321
 
309
322
        struct {
310
 
                const char *file;               /* file where the section appears */
 
323
                char *file;                     /* file where the section appears */
311
324
                int line;                       /* line where the section appears */
312
325
                struct eb32_node id;            /* place in the tree of used IDs */
313
326
                struct eb_root used_listener_id;/* list of listener IDs in use */