uapi: ebtables: don't include linux/if.h
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Apr 2015 17:41:40 +0000 (19:41 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 13 Apr 2015 18:08:38 +0000 (20:08 +0200)
linux/if.h creates conflicts in userspace with net/if.h

By using it here we force userspace to use linux/if.h while
net/if.h may be needed.

Note that:

include/linux/netfilter_ipv4/ip_tables.h and
include/linux/netfilter_ipv6/ip6_tables.h

don't include linux/if.h and they also refer to IFNAMSIZ, so they are
expecting userspace to include use net/if.h from the client program.

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter_bridge/ebtables.h
include/uapi/linux/netfilter_bridge/ebtables.h

index 34e7a2b7f8677f9f923fd48a366e09e5d4d643ee..f1bd3962e6b6d2388ff611da201bf87584f7d5b2 100644 (file)
 #ifndef __LINUX_BRIDGE_EFF_H
 #define __LINUX_BRIDGE_EFF_H
 
+#include <linux/if.h>
+#include <linux/if_ether.h>
 #include <uapi/linux/netfilter_bridge/ebtables.h>
 
-
 /* return values for match() functions */
 #define EBT_MATCH 0
 #define EBT_NOMATCH 1
index ba993360dbe908cf08faf81956e2ef23dd68a4af..773dfe8924c7e76a0411e08247663203a69e5306 100644 (file)
@@ -12,9 +12,7 @@
 
 #ifndef _UAPI__LINUX_BRIDGE_EFF_H
 #define _UAPI__LINUX_BRIDGE_EFF_H
-#include <linux/if.h>
 #include <linux/netfilter_bridge.h>
-#include <linux/if_ether.h>
 
 #define EBT_TABLE_MAXNAMELEN 32
 #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN