On 27 March 2015 at 14:14, Patrick McHardy <kaber@xxxxxxxxx> wrote: > On 27.03, Pablo Neira Ayuso wrote: >> On Fri, Mar 27, 2015 at 01:59:31PM +0100, Arturo Borrero Gonzalez wrote: >> > >> >> index 0000000..414f3d1 >> > >> >> --- /dev/null >> > >> >> +++ b/include/xt.h >> > >> >> @@ -0,0 +1,100 @@ >> > >> >> +#ifndef _NFT_XT_H_ >> > >> >> +#define _NFT_XT_H_ >> > >> >> + >> > >> >> +#include <net/if.h> >> > >> >> + >> > >> >> +/* Fake ebt_entry */ >> > >> >> +struct ebt_entry { >> > >> > >> > >> > I think you can avoid this if you: >> > >> > >> > >> > #include <linux/netfilter_bridge/ebtables.h> >> > >> >> > >> Can't include <linux/netfilter_bridge/ebtables.h> because it includes >> > >> <linux/if.h> and clash with <net/if.h> >> > > >> > > There must be a clean way to fix this without embedding the ebt_entry >> > > structure. >> > >> > We seem to have the same problem in ebtables-compat: >> > >> > http://git.netfilter.org/iptables/tree/iptables/nft-bridge.h#n32 >> >> Try to find a way to fix it there too ;-) > > Can't we switch to the linux includes? We're Linux only anyways :) It doesn't seem to be that simple: * src/meta.c uses if_nametoindex() and if_indextoname() which are defined in <net/if.h> and not in <linux/if.h>. * <xtables.h> uses <net/if.h> and replacing it leads to also touch <include/libiptc/ipt_kernel_headers.h> Should I workaround these two? Could you please suggest any replacement for if_nametoindex() and if_indextoname()? regards -- Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html