Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59011
b: refs/heads/master
c: ce7663d
h: refs/heads/master
i:
  59009: 99b5153
  59007: ac4f56a
v: v3
  • Loading branch information
Yasuyuki Kozakai authored and David S. Miller committed Jul 11, 2007
1 parent e30a2f0 commit 31e6846
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 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: 0d53778e81ac7af266dac8a20cc328328c327112
refs/heads/master: ce7663d84a87bb4e1743f62950bf7dceed723a13
3 changes: 2 additions & 1 deletion trunk/include/linux/netfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ struct nf_queue_handler {
};
extern int nf_register_queue_handler(int pf,
struct nf_queue_handler *qh);
extern int nf_unregister_queue_handler(int pf);
extern int nf_unregister_queue_handler(int pf,
struct nf_queue_handler *qh);
extern void nf_unregister_queue_handlers(struct nf_queue_handler *qh);
extern void nf_reinject(struct sk_buff *skb,
struct nf_info *info,
Expand Down
7 changes: 6 additions & 1 deletion trunk/net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ int nf_register_queue_handler(int pf, struct nf_queue_handler *qh)
EXPORT_SYMBOL(nf_register_queue_handler);

/* The caller must flush their queue before this */
int nf_unregister_queue_handler(int pf)
int nf_unregister_queue_handler(int pf, struct nf_queue_handler *qh)
{
if (pf >= NPROTO)
return -EINVAL;

write_lock_bh(&queue_handler_lock);
if (queue_handler[pf] != qh) {
write_unlock_bh(&queue_handler_lock);
return -EINVAL;
}

queue_handler[pf] = NULL;
write_unlock_bh(&queue_handler_lock);

Expand Down
4 changes: 1 addition & 3 deletions trunk/net/netfilter/nfnetlink_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,9 +913,7 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
case NFQNL_CFG_CMD_PF_UNBIND:
QDEBUG("unregistering queue handler for pf=%u\n",
ntohs(cmd->pf));
/* This is a bug and a feature. We can unregister
* other handlers(!) */
ret = nf_unregister_queue_handler(ntohs(cmd->pf));
ret = nf_unregister_queue_handler(ntohs(cmd->pf), &nfqh);
break;
default:
ret = -EINVAL;
Expand Down

0 comments on commit 31e6846

Please sign in to comment.