Patchwork [07/11] netfilter: nf_tables: fix invalid event type in nf_tables_getrule()

login
register
mail settings
Submitter Patrick McHardy
Date Dec. 12, 2012, 6:47 p.m.
Message ID <1355338061-5517-8-git-send-email-kaber@trash.net>
Download mbox | patch
Permalink /patch/205619/
State Accepted
Headers show

Comments

Patrick McHardy - Dec. 12, 2012, 6:47 p.m.
From: Patrick McHardy <kaber@trash.net>

The event type should be NFT_MSG_NEWRULE, not NFT_MSG_NEWCHAIN.

Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 net/netfilter/nf_tables_api.c | 2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index bc4eb76..afda73f 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1292,7 +1292,7 @@  static int nf_tables_getrule(struct sock *nlsk, struct sk_buff *skb,
 		return -ENOMEM;
 
 	err = nf_tables_fill_rule_info(skb2, NETLINK_CB(skb).portid,
-				       nlh->nlmsg_seq, NFT_MSG_NEWCHAIN,
+				       nlh->nlmsg_seq, NFT_MSG_NEWRULE,
 				       family, table, chain, rule);
 	if (err < 0)
 		goto err;