haproxy/doc
Tim Duesterhus 1478aa795e MEDIUM: sample: Add IPv6 support to the ipmask converter
Add an optional second parameter to the ipmask converter that specifies
the number of bits to mask off IPv6 addresses.

If the second parameter is not given IPv6 addresses fail to mask (resulting
in an empty string), preserving backwards compatibility: Previously
a sample like `src,ipmask(24)` failed to give a result for IPv6 addresses.

This feature can be tested like this:

  defaults
  	log	global
  	mode	http
  	option	httplog
  	option	dontlognull
  	timeout connect 5000
  	timeout client  50000
  	timeout server  50000

  frontend fe
  	bind :::8080 v4v6

  	# Masked IPv4 for IPv4, empty for IPv6 (with and without this commit)
  	http-response set-header Test %[src,ipmask(24)]
  	# Correctly masked IP addresses for both IPv4 and IPv6
  	http-response set-header Test2 %[src,ipmask(24,ffff:ffff:ffff:ffff::)]
  	# Correctly masked IP addresses for both IPv4 and IPv6
  	http-response set-header Test3 %[src,ipmask(24,64)]

  	default_backend be

  backend be
  	server s example.com:80

Tested-By: Jarno Huuskonen <jarno.huuskonen@uef.fi>
2018-01-25 22:25:40 +01:00
..
design-thoughts
internals MEDIUM: threads/filters: Add init/deinit callback per thread 2017-10-31 13:58:32 +01:00
lua-api BUG/MEDIUM: lua: Fix IPv6 with separate port support for Socket.connect 2018-01-09 15:22:55 +01:00
51Degrees-device-detection.txt DOC: 51d: Updated git URL and instructions for getting Hash Trie data files. 2017-10-06 16:47:25 +02:00
acl.fig
architecture.txt
close-options.txt
coding-style.txt
configuration.txt MEDIUM: sample: Add IPv6 support to the ipmask converter 2018-01-25 22:25:40 +01:00
cookie-options.txt
DeviceAtlas-device-detection.txt DOC: move the device detection modules documentation to their own files 2016-11-08 15:06:21 +01:00
gpl.txt
haproxy.1 MINOR: doc: document the -x flag 2017-04-13 19:15:17 +02:00
intro.txt DOC/MINOR: intro: typo, wording, formatting fixes 2017-12-20 07:01:36 +01:00
lgpl.txt
linux-syn-cookies.txt
lua.txt DOC: LUA: fix some typos and syntax errors 2016-02-16 11:07:45 +01:00
management.txt MINOR: global: add some global activity counters to help debugging 2018-01-23 15:38:33 +01:00
netscaler-client-ip-insertion-protocol.txt MEDIUM: netscaler: add support for standard NetScaler CIP protocol 2017-12-20 07:04:07 +01:00
network-namespaces.txt
peers-v2.0.txt DOC: add initial peers protovol v2.0 documentation. 2017-11-24 18:28:05 +01:00
peers.txt DOC: fix mangled version in peers protocol documentation 2017-11-24 18:10:24 +01:00
proxy-protocol.txt DOC: mention lighttpd 1.4.46 implements PROXY 2017-04-05 08:42:39 +02:00
queuing.fig
SPOE.txt MINOR: spoe: add register-var-names directive in spoe-agent configuration 2018-01-15 13:47:27 +01:00
WURFL-device-detection.txt DOC: move the device detection modules documentation to their own files 2016-11-08 15:06:21 +01:00