Skip to content

Commit 85cfbc2

Browse files
a3a3elummakynes
authored andcommitted
netfilter: inline xt_hashlimit, ebt_802_3 and xt_physdev headers
Three netfilter headers are only included once. Inline their contents at those sites and remove them. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent f5d65c1 commit 85cfbc2

6 files changed

Lines changed: 16 additions & 35 deletions

File tree

‎include/linux/netfilter/xt_hashlimit.h‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎include/linux/netfilter/xt_physdev.h‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎include/linux/netfilter_bridge/ebt_802_3.h‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎net/bridge/netfilter/ebt_802_3.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
#include <linux/module.h>
1212
#include <linux/netfilter/x_tables.h>
1313
#include <linux/netfilter_bridge/ebtables.h>
14-
#include <linux/netfilter_bridge/ebt_802_3.h>
14+
#include <linux/skbuff.h>
15+
#include <uapi/linux/netfilter_bridge/ebt_802_3.h>
16+
17+
static struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb)
18+
{
19+
return (struct ebt_802_3_hdr *)skb_mac_header(skb);
20+
}
1521

1622
static bool
1723
ebt_802_3_mt(const struct sk_buff *skb, struct xt_action_param *par)

‎net/netfilter/xt_hashlimit.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@
3434
#include <linux/netfilter/x_tables.h>
3535
#include <linux/netfilter_ipv4/ip_tables.h>
3636
#include <linux/netfilter_ipv6/ip6_tables.h>
37-
#include <linux/netfilter/xt_hashlimit.h>
3837
#include <linux/mutex.h>
3938
#include <linux/kernel.h>
39+
#include <uapi/linux/netfilter/xt_hashlimit.h>
40+
41+
#define XT_HASHLIMIT_ALL (XT_HASHLIMIT_HASH_DIP | XT_HASHLIMIT_HASH_DPT | \
42+
XT_HASHLIMIT_HASH_SIP | XT_HASHLIMIT_HASH_SPT | \
43+
XT_HASHLIMIT_INVERT | XT_HASHLIMIT_BYTES |\
44+
XT_HASHLIMIT_RATE_MATCH)
4045

4146
MODULE_LICENSE("GPL");
4247
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");

‎net/netfilter/xt_physdev.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
/* (C) 2001-2003 Bart De Schuymer <bdschuym@pandora.be>
66
*/
77
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
8+
9+
#include <linux/if.h>
810
#include <linux/module.h>
911
#include <linux/skbuff.h>
1012
#include <linux/netfilter_bridge.h>
11-
#include <linux/netfilter/xt_physdev.h>
1213
#include <linux/netfilter/x_tables.h>
13-
#include <net/netfilter/br_netfilter.h>
14+
#include <uapi/linux/netfilter/xt_physdev.h>
1415

1516
MODULE_LICENSE("GPL");
1617
MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");

0 commit comments

Comments
 (0)