check_ipset() had a fallback guarded by #ifndef IP_SET_INVALID. No
released header has ever defined that macro; ip_set.h spells it
IPSET_INVALID_ID. The guard therefore always fired, defining
IPSET_DIM_MAX as 3 where the header says 6 and ip_set_id_t as unsigned
short where it is __u16. The test only kept working because ip_set.h is
included first and defines both itself.
check_setns() also wrote IP_CONFIG_SETNS, which no makefile reads. The
-DHAVE_SETNS on the next line is what gates the fallback in
include/namespace.h.
Signed-off-by: Stephen Hemminger <step…@networkplumber.org>
---
configure | 5 -----
1 file changed, 5 deletions(-)
diff --git a/configure b/configure
index d81a6a81..ef155ab3 100755
--- a/configure
+++ b/configure
@@ -84,7 +84,6 @@ int main(int argc, char **argv)
}
EOF
if $CC -I$INCLUDE -o $TMPDIR/setnstest $TMPDIR/setnstest.c >/dev/null 2>&1; then
- echo "IP_CONFIG_SETNS:=y" >>$CONFIG
echo "yes"
echo "CFLAGS += -DHAVE_SETNS" >>$CONFIG
else
@@ -121,10 +120,6 @@ check_ipset()
{
cat >$TMPDIR/ipsettest.c <<EOF
#include <linux/netfilter/ipset/ip_set.h>
-#ifndef IP_SET_INVALID
-#define IPSET_DIM_MAX 3
-typedef unsigned short ip_set_id_t;
-#endif
#include <linux/netfilter/xt_set.h>
struct xt_set_info info;
--
2.53.0