Skip to content

Commit 24477e5

Browse files
committed
uapi: ebtables: don't include linux/if.h
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 <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 7d74026 commit 24477e5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

include/linux/netfilter_bridge/ebtables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
#ifndef __LINUX_BRIDGE_EFF_H
1313
#define __LINUX_BRIDGE_EFF_H
1414

15+
#include <linux/if.h>
16+
#include <linux/if_ether.h>
1517
#include <uapi/linux/netfilter_bridge/ebtables.h>
1618

17-
1819
/* return values for match() functions */
1920
#define EBT_MATCH 0
2021
#define EBT_NOMATCH 1

include/uapi/linux/netfilter_bridge/ebtables.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
#ifndef _UAPI__LINUX_BRIDGE_EFF_H
1414
#define _UAPI__LINUX_BRIDGE_EFF_H
15-
#include <linux/if.h>
1615
#include <linux/netfilter_bridge.h>
17-
#include <linux/if_ether.h>
1816

1917
#define EBT_TABLE_MAXNAMELEN 32
2018
#define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN

0 commit comments

Comments
 (0)