summaryrefslogtreecommitdiff
path: root/configure.ac+lt
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2017-12-23 01:18:23 +0100
committerFrancis Dupont <fdupont@isc.org>2017-12-23 01:18:23 +0100
commit563f0b8aef9558a900f215dfccc571eab99a0223 (patch)
tree4d5ce8719fe415d089569f5f98ca84c944a42aaf /configure.ac+lt
parent0d6d300fec8b26c9e854095a4a29158186b69172 (diff)
downloadisc-dhcp-563f0b8aef9558a900f215dfccc571eab99a0223.tar.gz
Merged rt44535 (relay port)
Diffstat (limited to 'configure.ac+lt')
-rw-r--r--configure.ac+lt19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac+lt b/configure.ac+lt
index e8c0b16a..ede7ec04 100644
--- a/configure.ac+lt
+++ b/configure.ac+lt
@@ -178,6 +178,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)]))
@@ -522,6 +531,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
@@ -532,6 +542,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"
@@ -545,10 +556,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
@@ -1040,6 +1058,7 @@ Features:
dhcpv6: $enable_dhcpv6
delayed-ack: $enable_delayed_ack
dhcpv4o6: $enable_dhcpv4o6
+ relay-port: $enable_relay_port
Developer:
ATF unittests : $atf_path