|
|
34625f |
From ed4ceb7da31534de89df66d241d449c644fd3ec2 Mon Sep 17 00:00:00 2001
|
|
|
34625f |
From: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
34625f |
Date: Tue, 16 Oct 2018 20:56:57 +0200
|
|
|
34625f |
Subject: [PATCH] src: remove opts field from struct xt_stmt
|
|
|
34625f |
|
|
|
34625f |
This is never used, ie. always NULL.
|
|
|
34625f |
|
|
|
34625f |
Reported-by: Phil Sutter <phil@nwl.cc>
|
|
|
34625f |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
34625f |
Acked-by: Phil Sutter <phil@nwl.cc>
|
|
|
34625f |
(cherry picked from commit b274c169014e71715f9333ee028c5a9304881919)
|
|
|
34625f |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
34625f |
---
|
|
|
34625f |
include/statement.h | 1 -
|
|
|
34625f |
src/statement.c | 1 -
|
|
|
34625f |
src/xt.c | 8 ++------
|
|
|
34625f |
3 files changed, 2 insertions(+), 8 deletions(-)
|
|
|
34625f |
|
|
|
34625f |
diff --git a/include/statement.h b/include/statement.h
|
|
|
34625f |
index 5a907aa4dee48..0ddbffd24772b 100644
|
|
|
34625f |
--- a/include/statement.h
|
|
|
34625f |
+++ b/include/statement.h
|
|
|
34625f |
@@ -225,7 +225,6 @@ struct xt_stmt {
|
|
|
34625f |
struct xtables_match *match;
|
|
|
34625f |
struct xtables_target *target;
|
|
|
34625f |
};
|
|
|
34625f |
- const char *opts;
|
|
|
34625f |
void *entry;
|
|
|
34625f |
};
|
|
|
34625f |
|
|
|
34625f |
diff --git a/src/statement.c b/src/statement.c
|
|
|
34625f |
index 58e86f215d5ac..e9c9d648b0092 100644
|
|
|
34625f |
--- a/src/statement.c
|
|
|
34625f |
+++ b/src/statement.c
|
|
|
34625f |
@@ -767,7 +767,6 @@ static void xt_stmt_print(const struct stmt *stmt, struct output_ctx *octx)
|
|
|
34625f |
static void xt_stmt_destroy(struct stmt *stmt)
|
|
|
34625f |
{
|
|
|
34625f |
xfree(stmt->xt.name);
|
|
|
34625f |
- xfree(stmt->xt.opts);
|
|
|
34625f |
xt_stmt_release(stmt);
|
|
|
34625f |
}
|
|
|
34625f |
|
|
|
34625f |
diff --git a/src/xt.c b/src/xt.c
|
|
|
34625f |
index 95d0c5f24c07e..74763d58cafd7 100644
|
|
|
34625f |
--- a/src/xt.c
|
|
|
34625f |
+++ b/src/xt.c
|
|
|
34625f |
@@ -32,9 +32,7 @@ void xt_stmt_xlate(const struct stmt *stmt)
|
|
|
34625f |
|
|
|
34625f |
switch (stmt->xt.type) {
|
|
|
34625f |
case NFT_XT_MATCH:
|
|
|
34625f |
- if (stmt->xt.match == NULL && stmt->xt.opts) {
|
|
|
34625f |
- printf("%s", stmt->xt.opts);
|
|
|
34625f |
- } else if (stmt->xt.match->xlate) {
|
|
|
34625f |
+ if (stmt->xt.match->xlate) {
|
|
|
34625f |
struct xt_xlate_mt_params params = {
|
|
|
34625f |
.ip = stmt->xt.entry,
|
|
|
34625f |
.match = stmt->xt.match->m,
|
|
|
34625f |
@@ -51,9 +49,7 @@ void xt_stmt_xlate(const struct stmt *stmt)
|
|
|
34625f |
break;
|
|
|
34625f |
case NFT_XT_WATCHER:
|
|
|
34625f |
case NFT_XT_TARGET:
|
|
|
34625f |
- if (stmt->xt.target == NULL && stmt->xt.opts) {
|
|
|
34625f |
- printf("%s", stmt->xt.opts);
|
|
|
34625f |
- } else if (stmt->xt.target->xlate) {
|
|
|
34625f |
+ if (stmt->xt.target->xlate) {
|
|
|
34625f |
struct xt_xlate_tg_params params = {
|
|
|
34625f |
.ip = stmt->xt.entry,
|
|
|
34625f |
.target = stmt->xt.target->t,
|
|
|
34625f |
--
|
|
|
34625f |
2.19.0
|
|
|
34625f |
|