-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains a final Netfilter pull request for net-next 4.2. This mostly addresses some fallout from the previous pull request, small netns updates and a couple of new features for nfnetlink_log and the socket match that didn't get in time for the previous pull request. More specifically they are: 1) Add security context information to nfnetlink_queue, from Roman Kubiak. 2) Add support to restore the sk_mark into skb->mark through xt_socket, from Harout Hedeshian. 3) Force alignment of 16 bytes of per cpu xt_counters, from Eric Dumazet. 4) Rename br_netfilter.c to br_netfilter_hooks.c to prepare split of IPv6 code into a separated file. 5) Move the IPv6 code in br_netfilter into a separated file. 6) Remove unused RCV_SKB_FAIL() in nfnetlink_queue and nfetlink_log, from Eric Biederman. 7) Two liner to simplify netns logic in em_ipset_match(). 8) Add missing includes to net/net_namespace.h to avoid compilation problems that result from not including linux/netfilter.h in netns headers. 9) Use a forward declaration instead of including linux/proc_fs.h from netns/netfilter.h 10) Add a new linux/netfilter_defs.h to replace the linux/netfilter.h inclusion in netns headers. 11) Remove spurious netfilter.h file included in the net tree, also from Eric Biederman. 12) Fix x_tables compilation warnings on 32 bits platforms that resulted from recent changes in x_tables counters, from Florian Westphal. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
31 changed files
with
444 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#ifndef __LINUX_NETFILTER_CORE_H_ | ||
#define __LINUX_NETFILTER_CORE_H_ | ||
|
||
#include <uapi/linux/netfilter.h> | ||
|
||
/* Largest hook number + 1, see uapi/linux/netfilter_decnet.h */ | ||
#define NF_MAX_HOOKS 8 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,66 @@ | ||
#ifndef _BR_NETFILTER_H_ | ||
#define _BR_NETFILTER_H_ | ||
|
||
#include "../../../net/bridge/br_private.h" | ||
|
||
static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) | ||
{ | ||
skb->nf_bridge = kzalloc(sizeof(struct nf_bridge_info), GFP_ATOMIC); | ||
|
||
if (likely(skb->nf_bridge)) | ||
atomic_set(&(skb->nf_bridge->use), 1); | ||
|
||
return skb->nf_bridge; | ||
} | ||
|
||
void nf_bridge_update_protocol(struct sk_buff *skb); | ||
|
||
static inline struct nf_bridge_info * | ||
nf_bridge_info_get(const struct sk_buff *skb) | ||
{ | ||
return skb->nf_bridge; | ||
} | ||
|
||
unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb); | ||
|
||
static inline void nf_bridge_push_encap_header(struct sk_buff *skb) | ||
{ | ||
unsigned int len = nf_bridge_encap_header_len(skb); | ||
|
||
skb_push(skb, len); | ||
skb->network_header -= len; | ||
} | ||
|
||
int br_nf_pre_routing_finish_bridge(struct sock *sk, struct sk_buff *skb); | ||
|
||
static inline struct rtable *bridge_parent_rtable(const struct net_device *dev) | ||
{ | ||
struct net_bridge_port *port; | ||
|
||
port = br_port_get_rcu(dev); | ||
return port ? &port->br->fake_rtable : NULL; | ||
} | ||
|
||
struct net_device *setup_pre_routing(struct sk_buff *skb); | ||
void br_netfilter_enable(void); | ||
|
||
#if IS_ENABLED(CONFIG_IPV6) | ||
int br_validate_ipv6(struct sk_buff *skb); | ||
unsigned int br_nf_pre_routing_ipv6(const struct nf_hook_ops *ops, | ||
struct sk_buff *skb, | ||
const struct nf_hook_state *state); | ||
#else | ||
static inline int br_validate_ipv6(struct sk_buff *skb) | ||
{ | ||
return -1; | ||
} | ||
|
||
static inline unsigned int | ||
br_nf_pre_routing_ipv6(const struct nf_hook_ops *ops, struct sk_buff *skb, | ||
const struct nf_hook_state *state) | ||
{ | ||
return NF_DROP; | ||
} | ||
#endif | ||
|
||
#endif /* _BR_NETFILTER_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.