Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224413
b: refs/heads/master
c: da68365
h: refs/heads/master
i:
  224411: 4f8f0b2
v: v3
  • Loading branch information
Eric Paris authored and David S. Miller committed Nov 17, 2010
1 parent 1023ce7 commit 5099999
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37d668004289d202f71dc5bfdadf6c18b34577a2
refs/heads/master: da6836500414ae734cd9873c2d553db594f831e9
2 changes: 2 additions & 0 deletions trunk/include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)

#define NF_DROP_ERR(x) (((-x) << NF_VERDICT_BITS) | NF_DROP)

/* only for userspace compatibility */
#ifndef __KERNEL__
/* Generic cache responses from hook functions.
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/netfilter/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,11 @@ int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
outdev, &elem, okfn, hook_thresh);
if (verdict == NF_ACCEPT || verdict == NF_STOP) {
ret = 1;
} else if (verdict == NF_DROP) {
} else if ((verdict & NF_VERDICT_MASK) == NF_DROP) {
kfree_skb(skb);
ret = -EPERM;
ret = -(verdict >> NF_VERDICT_BITS);
if (ret == 0)
ret = -EPERM;
} else if ((verdict & NF_VERDICT_MASK) == NF_QUEUE) {
if (!nf_queue(skb, elem, pf, hook, indev, outdev, okfn,
verdict >> NF_VERDICT_BITS))
Expand Down

0 comments on commit 5099999

Please sign in to comment.