Hi, On Wed, 29 Jun 2022, Vishwanath Pai wrote: > We redefined a few things from nf_inet_addr.h, this will prevent others > from including nf_inet_addr.h and ipset headers in the same file. > > Remove the duplicate definitions and include nf_inet_addr.h instead. Please don't do that or add the required compatibility stuff into configure.ac and ip_set_compat.h.in in order not to break support for older kernels. Best regards, Jozsef > Signed-off-by: Vishwanath Pai <vpai@xxxxxxxxxx> > Signed-off-by: Joshua Hunt <johunt@xxxxxxxxxx> > --- > include/libipset/nf_inet_addr.h | 9 +-------- > include/libipset/nfproto.h | 15 +-------------- > 2 files changed, 2 insertions(+), 22 deletions(-) > > diff --git a/include/libipset/nf_inet_addr.h b/include/libipset/nf_inet_addr.h > index f3bdf01..e1e058c 100644 > --- a/include/libipset/nf_inet_addr.h > +++ b/include/libipset/nf_inet_addr.h > @@ -10,13 +10,6 @@ > #include <stdint.h> /* uint32_t */ > #include <netinet/in.h> /* struct in[6]_addr */ > > -/* The structure to hold IP addresses, same as in linux/netfilter.h */ > -union nf_inet_addr { > - uint32_t all[4]; > - uint32_t ip; > - uint32_t ip6[4]; > - struct in_addr in; > - struct in6_addr in6; > -}; > +#include <linux/netfilter.h> > > #endif /* LIBIPSET_NF_INET_ADDR_H */ > diff --git a/include/libipset/nfproto.h b/include/libipset/nfproto.h > index 800da11..5265176 100644 > --- a/include/libipset/nfproto.h > +++ b/include/libipset/nfproto.h > @@ -1,19 +1,6 @@ > #ifndef LIBIPSET_NFPROTO_H > #define LIBIPSET_NFPROTO_H > > -/* > - * The constants to select, same as in linux/netfilter.h. > - * Like nf_inet_addr.h, this is just here so that we need not to rely on > - * the presence of a recent-enough netfilter.h. > - */ > -enum { > - NFPROTO_UNSPEC = 0, > - NFPROTO_IPV4 = 2, > - NFPROTO_ARP = 3, > - NFPROTO_BRIDGE = 7, > - NFPROTO_IPV6 = 10, > - NFPROTO_DECNET = 12, > - NFPROTO_NUMPROTO, > -}; > +#include <linux/netfilter.h> > > #endif /* LIBIPSET_NFPROTO_H */ > -- > 2.25.1 > > - E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxx PGP key : https://wigner.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics H-1525 Budapest 114, POB. 49, Hungary