|
|
f1d1c0 |
From 0c808b1ee29d4a0974f4cc5c0586138730361a41 Mon Sep 17 00:00:00 2001
|
|
|
f1d1c0 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
f1d1c0 |
Date: Fri, 10 Jan 2020 19:54:16 +0100
|
|
|
f1d1c0 |
Subject: [PATCH] main: restore --debug
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1778883
|
|
|
f1d1c0 |
Upstream Status: nftables commit ea5af85371bd1
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
commit ea5af85371bd18658ea2ffa0a6c9c48e2c64684b
|
|
|
f1d1c0 |
Author: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
f1d1c0 |
Date: Thu Jan 9 18:16:18 2020 +0100
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
main: restore --debug
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
Broken since options are mandatory before commands.
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
Fixes: fb9cea50e8b3 ("main: enforce options before commands")
|
|
|
f1d1c0 |
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
f1d1c0 |
---
|
|
|
f1d1c0 |
src/main.c | 6 ++++--
|
|
|
f1d1c0 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
diff --git a/src/main.c b/src/main.c
|
|
|
f1d1c0 |
index 74199f9..6ab1b89 100644
|
|
|
f1d1c0 |
--- a/src/main.c
|
|
|
f1d1c0 |
+++ b/src/main.c
|
|
|
f1d1c0 |
@@ -46,7 +46,7 @@ enum opt_vals {
|
|
|
f1d1c0 |
OPT_TERSE = 't',
|
|
|
f1d1c0 |
OPT_INVALID = '?',
|
|
|
f1d1c0 |
};
|
|
|
f1d1c0 |
-#define OPTSTRING "+hvcf:iI:jvnsNaeSupypTt"
|
|
|
f1d1c0 |
+#define OPTSTRING "+hvd:cf:iI:jvnsNaeSupypTt"
|
|
|
f1d1c0 |
|
|
|
f1d1c0 |
static const struct option options[] = {
|
|
|
f1d1c0 |
{
|
|
|
f1d1c0 |
@@ -228,8 +228,10 @@ static bool nft_options_check(int argc, char * const argv[])
|
|
|
f1d1c0 |
if (nonoption) {
|
|
|
f1d1c0 |
nft_options_error(argc, argv, pos);
|
|
|
f1d1c0 |
return false;
|
|
|
f1d1c0 |
- } else if (argv[i][1] == 'I' ||
|
|
|
f1d1c0 |
+ } else if (argv[i][1] == 'd' ||
|
|
|
f1d1c0 |
+ argv[i][1] == 'I' ||
|
|
|
f1d1c0 |
argv[i][1] == 'f' ||
|
|
|
f1d1c0 |
+ !strcmp(argv[i], "--debug") ||
|
|
|
f1d1c0 |
!strcmp(argv[i], "--includepath") ||
|
|
|
f1d1c0 |
!strcmp(argv[i], "--file")) {
|
|
|
f1d1c0 |
skip = true;
|
|
|
f1d1c0 |
--
|
|
|
bfbb76 |
2.31.1
|
|
|
f1d1c0 |
|