From 563f0b8aef9558a900f215dfccc571eab99a0223 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sat, 23 Dec 2017 01:18:23 +0100 Subject: Merged rt44535 (relay port) --- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.1