|
@@ -346,8 +346,23 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
|
|
|
}
|
|
|
|
|
|
#else /* !CONFIG_NETFILTER */
|
|
|
-#define NF_HOOK(pf, hook, net, sk, skb, indev, outdev, okfn) (okfn)(net, sk, skb)
|
|
|
-#define NF_HOOK_COND(pf, hook, net, sk, skb, indev, outdev, okfn, cond) (okfn)(net, sk, skb)
|
|
|
+static inline int
|
|
|
+NF_HOOK_COND(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk,
|
|
|
+ struct sk_buff *skb, struct net_device *in, struct net_device *out,
|
|
|
+ int (*okfn)(struct net *, struct sock *, struct sk_buff *),
|
|
|
+ bool cond)
|
|
|
+{
|
|
|
+ return okfn(net, sk, skb);
|
|
|
+}
|
|
|
+
|
|
|
+static inline int
|
|
|
+NF_HOOK(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk,
|
|
|
+ struct sk_buff *skb, struct net_device *in, struct net_device *out,
|
|
|
+ int (*okfn)(struct net *, struct sock *, struct sk_buff *))
|
|
|
+{
|
|
|
+ return okfn(net, sk, skb);
|
|
|
+}
|
|
|
+
|
|
|
static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net,
|
|
|
struct sock *sk, struct sk_buff *skb,
|
|
|
struct net_device *indev, struct net_device *outdev,
|