Reduce ifdef pollution slightly, no functional change. We can simply
remove the extra alternative definition of handle_ing() and nf_ingress().
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
EXPORT_SYMBOL_GPL(br_fdb_test_addr_hook);
#endif
EXPORT_SYMBOL_GPL(br_fdb_test_addr_hook);
#endif
-#ifdef CONFIG_NET_CLS_ACT
static inline struct sk_buff *handle_ing(struct sk_buff *skb,
struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev)
{
static inline struct sk_buff *handle_ing(struct sk_buff *skb,
struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev)
{
+#ifdef CONFIG_NET_CLS_ACT
struct tcf_proto *cl = rcu_dereference_bh(skb->dev->ingress_cl_list);
struct tcf_result cl_res;
struct tcf_proto *cl = rcu_dereference_bh(skb->dev->ingress_cl_list);
struct tcf_result cl_res;
-
- return skb;
-}
-#else
-static inline struct sk_buff *handle_ing(struct sk_buff *skb,
- struct packet_type **pt_prev,
- int *ret, struct net_device *orig_dev)
-{
+#endif /* CONFIG_NET_CLS_ACT */
/**
* netdev_rx_handler_register - register receive handler
/**
* netdev_rx_handler_register - register receive handler
-#ifdef CONFIG_NETFILTER_INGRESS
static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev)
{
static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev)
{
+#ifdef CONFIG_NETFILTER_INGRESS
if (nf_hook_ingress_active(skb)) {
if (*pt_prev) {
*ret = deliver_skb(skb, *pt_prev, orig_dev);
if (nf_hook_ingress_active(skb)) {
if (*pt_prev) {
*ret = deliver_skb(skb, *pt_prev, orig_dev);
return nf_hook_ingress(skb);
}
return nf_hook_ingress(skb);
}
+#endif /* CONFIG_NETFILTER_INGRESS */
-#else
-static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev,
- int *ret, struct net_device *orig_dev)
-{
- return 0;
-}
-#endif
static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
{
static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc)
{