diff options
author | Patrick McHardy <kaber@trash.net> | 2010-02-19 02:03:28 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-02-19 02:03:28 -0500 |
commit | 4bac6b180771f7ef5275b1a6d88e630ca3a3d6f0 (patch) | |
tree | 3a528ddf792daea358d00d20e1065b6ed5bab30c /include | |
parent | 37ee3d5b3e979a168536e7e2f15bd1e769cb4122 (diff) |
netfilter: restore POST_ROUTING hook in NF_HOOK_COND
Commit 2249065 ("netfilter: get rid of the grossness in netfilter.h")
inverted the logic for conditional hook invocation, breaking the
POST_ROUTING hook invoked by ip_output().
Correct the logic and remove an unnecessary initialization.
Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 70079454ffd0..89341c32631a 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -212,8 +212,9 @@ NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb, | |||
212 | struct net_device *in, struct net_device *out, | 212 | struct net_device *in, struct net_device *out, |
213 | int (*okfn)(struct sk_buff *), bool cond) | 213 | int (*okfn)(struct sk_buff *), bool cond) |
214 | { | 214 | { |
215 | int ret = 1; | 215 | int ret; |
216 | if (cond || | 216 | |
217 | if (!cond || | ||
217 | (ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1)) | 218 | (ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN) == 1)) |
218 | ret = okfn(skb); | 219 | ret = okfn(skb); |
219 | return ret; | 220 | return ret; |