From 2b192857240827319b7f50a54be889ae884903d5 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Fri, 20 Jun 2025 15:48:47 +0100 Subject: [PATCH] Fix breakage of ipset on *BSD. Regression introduced in 98189ff988d01d48929057037060d8cb2b4a22a6 Thanks to Harper Andrews for spotting this. --- src/config.h | 11 ++++++++++- src/ipset.c | 2 +- src/tables.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/config.h b/src/config.h index e5dc967..707390a 100644 --- a/src/config.h +++ b/src/config.h @@ -349,7 +349,6 @@ HAVE_SOCKADDR_SA_LEN #endif #if !defined(HAVE_LINUX_NETWORK) -#undef HAVE_IPSET #undef HAVE_NFTSET #endif @@ -357,6 +356,16 @@ HAVE_SOCKADDR_SA_LEN #undef HAVE_IPSET #endif +#if defined(HAVE_IPSET) +# if defined(HAVE_LINUX_NETWORK) +# define HAVE_LINUX_IPSET +# elif defined(HAVE_BSD_NETWORK) +# define HAVE_BSD_IPSET +# else +# undef HAVE_IPSET +# endif +#endif + #ifdef NO_LOOP #undef HAVE_LOOP #endif diff --git a/src/ipset.c b/src/ipset.c index 003e9ed..94c520a 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -16,7 +16,7 @@ #include "dnsmasq.h" -#if defined(HAVE_IPSET) +#if defined(HAVE_LINUX_IPSET) #include #include diff --git a/src/tables.c b/src/tables.c index ccfe9ed..1a7e31d 100644 --- a/src/tables.c +++ b/src/tables.c @@ -18,7 +18,7 @@ #include "dnsmasq.h" -#if defined(HAVE_IPSET) && defined(HAVE_BSD_NETWORK) +#if defined(HAVE_BSD_IPSET) #include