haproxy/include/common
Willy Tarreau 16e015635c MINOR: tcp: add dst_is_local and src_is_local
It is sometimes needed in application server environments to easily tell
if a source is local to the machine or a remote one, without necessarily
knowing all the local addresses (dhcp, vrrp, etc). Similarly in transparent
proxy configurations it is sometimes desired to tell the difference between
local and remote destination addresses.

This patch adds two new sample fetch functions for this :

dst_is_local : boolean
  Returns true if the destination address of the incoming connection is local
  to the system, or false if the address doesn't exist on the system, meaning
  that it was intercepted in transparent mode. It can be useful to apply
  certain rules by default to forwarded traffic and other rules to the traffic
  targetting the real address of the machine. For example the stats page could
  be delivered only on this address, or SSH access could be locally redirected.
  Please note that the check involves a few system calls, so it's better to do
  it only once per connection.

src_is_local : boolean
  Returns true if the source address of the incoming connection is local to the
  system, or false if the address doesn't exist on the system, meaning that it
  comes from a remote machine. Note that UNIX addresses are considered local.
  It can be useful to apply certain access restrictions based on where the
  client comes from (eg: require auth or https for remote machines). Please
  note that the check involves a few system calls, so it's better to do it only
  once per connection.
2016-08-09 16:50:08 +02:00
..
accept4.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
base64.h
buffer.h BUG/MEDIUM: lua: segfault with buffer_replace2 2015-03-09 18:12:59 +01:00
cfgparse.h MINOR: cfgparse: New function cfg_unregister_sections() 2015-09-28 14:00:00 +02:00
chunk.h CLEANUP: chunk: adding NULL check to chunk_dup allocation. 2016-03-24 10:18:44 +01:00
compat.h BUILD: tcp: use IPPROTO_IP when SOL_IP is not available 2015-09-29 18:19:32 +02:00
compiler.h
config.h BUILD: fix dependencies between config and compat.h 2014-07-15 19:09:36 +02:00
debug.h MINOR: debug: enable memory poisonning to use byte 0 2015-10-08 14:12:13 +02:00
defaults.h MINOR: ssl: crt-list parsing factor 2016-06-20 17:29:56 +02:00
epoll.h MAJOR: polling: replace epoll with sepoll and remove sepoll 2012-11-11 20:53:30 +01:00
errors.h
hash.h MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
memory.h MEDIUM: pools: add a new flag to avoid rounding pool size up 2016-01-25 02:31:18 +01:00
mini-clist.h BUILD: freebsd: double declaration 2015-11-06 01:15:02 +01:00
namespace.h CLEANUP: namespaces: fix protection against multiple inclusions 2015-04-08 17:31:40 +02:00
rbtree.h
regex.h BUILD/MINOR: regex: missing header 2015-12-22 13:36:01 +01:00
splice.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
standard.h MINOR: tcp: add dst_is_local and src_is_local 2016-08-09 16:50:08 +02:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h
ticks.h
time.h BUILD: time: adapt the type of TV_ETERNITY to the local system 2013-12-13 09:22:23 +01:00
tools.h
uri_auth.h MINOR: stats: add ST_SHOWADMIN to pass the admin info in the regular flags 2016-03-11 17:08:05 +01:00
version.h DOC: stop referencing the slow git repository in the README 2014-05-10 11:04:39 +02:00