diff options
author | Francis Dupont <fdupont@isc.org> | 2017-12-23 01:18:23 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2017-12-23 01:18:23 +0100 |
commit | 563f0b8aef9558a900f215dfccc571eab99a0223 (patch) | |
tree | 4d5ce8719fe415d089569f5f98ca84c944a42aaf /configure.ac | |
parent | 0d6d300fec8b26c9e854095a4a29158186b69172 (diff) | |
download | isc-dhcp-563f0b8aef9558a900f215dfccc571eab99a0223.tar.gz |
Merged rt44535 (relay port)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 52e7bb4e..62593d3f 100644 --- a/configure.ac +++ b/configure.ac @@ -177,6 +177,15 @@ else enable_dhcpv4o6="no" fi +# Relay port (draft-ietf-dhc-relay-port-10.txt) optional compile-time feature. +AC_ARG_ENABLE(relay-port, + AS_HELP_STRING([--enable-relay-port],[enable support for relay port (default is no)])) +# Relay port is off by default (for now) +if test "$enable_relay_port" = "yes"; then + AC_DEFINE([RELAY_PORT], [1], + [Define to 1 to include relay port support.]) +fi + # PARANOIA is off by default (until we can test it with all features) AC_ARG_ENABLE(paranoia, AS_HELP_STRING([--enable-paranoia],[enable support for chroot/setuid (default is no)])) @@ -521,6 +530,7 @@ AC_CHECK_HEADERS(ifaddrs.h) # figure out what IPv4 interface code to use AC_CHECK_HEADERS(linux/types.h) # needed for linux/filter.h on old systems +relay_port_supported="no" AC_CHECK_HEADER(linux/filter.h, DO_LPF=1, , [ #ifdef HAVE_LINUX_TYPES_H @@ -531,6 +541,7 @@ if test -n "$DO_LPF" then AC_DEFINE([HAVE_LPF], [1], [Define to 1 to use the Linux Packet Filter interface code.]) + relay_port_supported="yes" else AC_CHECK_HEADER(sys/dlpi.h, DO_DLPI=1) if test -n "$DO_DLPI" @@ -544,10 +555,17 @@ else AC_DEFINE([HAVE_BPF], [1], [Define to 1 to use the Berkeley Packet Filter interface code.]) + relay_port_supported="yes" fi fi fi +if test "$enable_relay_port" = "yes"; then + if test "$relay_port_supported" != "yes"; then + AC_MSG_ERROR([--enable-relay-port requires BPF or LPF]) + fi +fi + # SIOCGLIFCONF uses some transport structures. Trick is not all platforms # use the same structures. We like to use 'struct lifconf' and 'struct # lifreq', but we'll use these other structures if they're present. HPUX @@ -1035,6 +1053,7 @@ Features: dhcpv6: $enable_dhcpv6 delayed-ack: $enable_delayed_ack dhcpv4o6: $enable_dhcpv4o6 + relay-port: $enable_relay_port Developer: ATF unittests : $atf_path |