[09/11] netfilter: nf_tables: return error for rule change request

Submitted by Patrick McHardy on Dec. 12, 2012, 6:47 p.m.

Details

Message ID 1355338061-5517-10-git-send-email-kaber@trash.net
State Accepted
Headers show

Commit Message

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

We only support full replacement, not change of a rule.

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 hide | download patch | download mbox

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index bacd417..c91f638 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1372,7 +1372,7 @@  static int nf_tables_newrule(struct sock *nlsk, struct sk_buff *skb,
 			old_rule = rule;
 			rule = NULL;
 		} else
-			return 0;
+			return -EOPNOTSUPP;
 	} else {
 		if (!create)
 			return -EINVAL;