MEDIUM: http-ana: Add IPv6 support for forwardfor and orignialto options
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Feb 2021 08:19:15 +0000 (09:19 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Feb 2021 12:52:48 +0000 (13:52 +0100)
commit5d1def623a4b1ba4794f5e56f5bf6602e86a5420
tree7ca386a626b49bceedc0eda4619e816796fc584d
parent9553de7fecfe9926d7af9d4656b8ba68e8c28fe0
MEDIUM: http-ana: Add IPv6 support for forwardfor and orignialto options

A network may be specified to avoid header addition for "forwardfor" and
"orignialto" option via the "except" parameter. However, only IPv4
networks/addresses are supported. This patch adds the support of IPv6.

To do so, the net_addr structure is used to store the parameter value in the
proxy structure. And ipcmp2net() function is used to perform the comparison.

This patch should fix the issue #1145. It depends on the following commit:

  * c6ce0ab MINOR: tools: Add function to compare an address to a network address
  * 5587287 MINOR: tools: Add net_addr structure describing a network addess
doc/configuration.txt
include/haproxy/proxy-t.h
src/cfgparse-listen.c
src/http_ana.c
src/proxy.c