[PATCH 04/13] extensions: remove bogus use of XT_GETOPT_TABLEEND

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit v1.4.8-36-g32b8e61 added this end marker in a little too many
places: at non-getopt places. Fix that.

Also change the definition of XT_GETOPT_TABLEEND to reference a struct
getopt member by name so that this cannot happen again.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx>
---
 extensions/libxt_TCPOPTSTRIP.c |    2 +-
 extensions/libxt_rateest.c     |    2 +-
 include/xtables.h.in           |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
index 43320d1..6897857 100644
--- a/extensions/libxt_TCPOPTSTRIP.c
+++ b/extensions/libxt_TCPOPTSTRIP.c
@@ -34,7 +34,7 @@ static const struct tcp_optionmap tcp_optionmap[] = {
 	{"sack",           "Selective ACK",        TCPOPT_SACK},
 	{"timestamp",      "Timestamp",            TCPOPT_TIMESTAMP},
 	{"md5",            "MD5 signature",        TCPOPT_MD5SIG},
-	XT_GETOPT_TABLEEND,
+	{NULL},
 };
 
 static void tcpoptstrip_tg_help(void)
diff --git a/extensions/libxt_rateest.c b/extensions/libxt_rateest.c
index 6998c01..e70edc6 100644
--- a/extensions/libxt_rateest.c
+++ b/extensions/libxt_rateest.c
@@ -80,7 +80,7 @@ static const struct rate_suffix {
 	{ "GBps",	8000000000. },
 	{ "TiBps",	8.*1024.*1024.*1024.*1024. },
 	{ "TBps",	8000000000000. },
-	XT_GETOPT_TABLEEND,
+	{NULL},
 };
 
 static int
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 0cd9f9f..da8d84c 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -346,7 +346,7 @@ struct xtables_globals
 	void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3)));
 };
 
-#define XT_GETOPT_TABLEEND {NULL}
+#define XT_GETOPT_TABLEEND {.name = NULL, .has_arg = false}
 
 #ifdef __cplusplus
 extern "C" {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux