Blame SOURCES/0021-src-remove-opts-field-from-struct-xt_stmt.patch

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