Hi,

The sample code provided at the end of the proxy protocol documentation [1] 
doesn't match the description earlier in the doc.  Specifically the header is 
described as:

    struct proxy_hdr_v2 {
        uint8_t sig[12];  /* hex 0D 0A 0D 0A 00 0D 0A 51 55 49 54 0A */
        uint8_t ver;      /* protocol version and command */
        uint8_t fam;      /* protocol family and address */
        uint16_t len;     /* number of following bytes part of the header */
    };


but then the code later has

              uint8_t sig[12];

              uint8_t ver;
              uint8_t cmd;
              uint8_t fam;
              uint8_t len;

Can you take a look; I think there may be some other adjustments needed to the 
sample code other than just fixing the structure.

Thanks



[1] http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt does

Reply via email to