|
|
8cce6c |
From 882a0b623fe352f1b25a8fc7652dfc9e2083549c Mon Sep 17 00:00:00 2001
|
|
|
8cce6c |
From: Phil Sutter <phil@nwl.cc>
|
|
|
8cce6c |
Date: Thu, 20 Dec 2018 16:09:06 +0100
|
|
|
8cce6c |
Subject: [PATCH] nft: Reduce __nft_rule_del() signature
|
|
|
8cce6c |
|
|
|
8cce6c |
The function does not use passed struct nftnl_rule_list, so remove it
|
|
|
8cce6c |
from its parameters.
|
|
|
8cce6c |
|
|
|
8cce6c |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
8cce6c |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
8cce6c |
(cherry picked from commit 9975b6da9f926994bcea8ae788e47aab4b5b235e)
|
|
|
8cce6c |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
8cce6c |
---
|
|
|
8cce6c |
iptables/nft.c | 7 +++----
|
|
|
8cce6c |
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
8cce6c |
|
|
|
8cce6c |
diff --git a/iptables/nft.c b/iptables/nft.c
|
|
|
8cce6c |
index 5032c718b33a9..befd9f4dd9026 100644
|
|
|
8cce6c |
--- a/iptables/nft.c
|
|
|
8cce6c |
+++ b/iptables/nft.c
|
|
|
8cce6c |
@@ -1946,8 +1946,7 @@ void nft_table_new(struct nft_handle *h, const char *table)
|
|
|
8cce6c |
nft_xt_builtin_init(h, table);
|
|
|
8cce6c |
}
|
|
|
8cce6c |
|
|
|
8cce6c |
-static int __nft_rule_del(struct nft_handle *h, struct nftnl_rule_list *list,
|
|
|
8cce6c |
- struct nftnl_rule *r)
|
|
|
8cce6c |
+static int __nft_rule_del(struct nft_handle *h, struct nftnl_rule *r)
|
|
|
8cce6c |
{
|
|
|
8cce6c |
int ret;
|
|
|
8cce6c |
|
|
|
8cce6c |
@@ -2046,7 +2045,7 @@ int nft_rule_delete(struct nft_handle *h, const char *chain,
|
|
|
8cce6c |
|
|
|
8cce6c |
r = nft_rule_find(h, list, chain, table, data, -1);
|
|
|
8cce6c |
if (r != NULL) {
|
|
|
8cce6c |
- ret =__nft_rule_del(h, list, r);
|
|
|
8cce6c |
+ ret =__nft_rule_del(h, r);
|
|
|
8cce6c |
if (ret < 0)
|
|
|
8cce6c |
errno = ENOMEM;
|
|
|
8cce6c |
if (verbose)
|
|
|
8cce6c |
@@ -2151,7 +2150,7 @@ int nft_rule_delete_num(struct nft_handle *h, const char *chain,
|
|
|
8cce6c |
r = nft_rule_find(h, list, chain, table, NULL, rulenum);
|
|
|
8cce6c |
if (r != NULL) {
|
|
|
8cce6c |
DEBUGP("deleting rule by number %d\n", rulenum);
|
|
|
8cce6c |
- ret = __nft_rule_del(h, list, r);
|
|
|
8cce6c |
+ ret = __nft_rule_del(h, r);
|
|
|
8cce6c |
if (ret < 0)
|
|
|
8cce6c |
errno = ENOMEM;
|
|
|
8cce6c |
} else
|
|
|
8cce6c |
--
|
|
|
8cce6c |
2.20.1
|
|
|
8cce6c |
|