diff options
author | Phil Sutter <phil@nwl.cc> | 2023-04-28 14:41:08 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-04-28 15:05:45 +0200 |
commit | 90a7a183a208b691810b8519cc57d3d9d3b7eb60 (patch) | |
tree | 4ba88802d9d4a1fa41f4022f4fd48ce52fb8f4b1 /extensions/libxt_standard.t | |
parent | 79f93b0943fa0e46ba29bb476362634509eb594e (diff) |
xshared: Fix parsing of option arguments in same word
When merging commandline parsers, a decision between 'argv[optind - 1]'
and 'optarg' had to be made in some spots. While the implementation of
check_inverse() required the former, use of the latter allows for the
common syntax of '--opt=arg' or even '-oarg' as 'optarg' will point at
the suffix while 'argv[optind - 1]' will just point at the following
option.
Fix the mess by making check_inverse() update optarg pointer if needed
so calling code may refer to and always correct 'optarg'.
Fixes: 0af80a91b0a98 ("nft: Merge xtables-arp-standalone.c into xtables-standalone.c")
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1677
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libxt_standard.t')
-rw-r--r-- | extensions/libxt_standard.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extensions/libxt_standard.t b/extensions/libxt_standard.t index 56d6da2e..6ed978e4 100644 --- a/extensions/libxt_standard.t +++ b/extensions/libxt_standard.t @@ -21,3 +21,6 @@ -s 10.11.12.13/255.128.0.0;-s 10.0.0.0/9;OK -s 10.11.12.13/255.0.255.0;-s 10.0.12.0/255.0.255.0;OK -s 10.11.12.13/255.0.12.0;-s 10.0.12.0/255.0.12.0;OK +:FORWARD +--protocol=tcp --source=1.2.3.4 --destination=5.6.7.8/32 --in-interface=eth0 --out-interface=eth1 --jump=ACCEPT;-s 1.2.3.4/32 -d 5.6.7.8/32 -i eth0 -o eth1 -p tcp -j ACCEPT;OK +-ptcp -s1.2.3.4 -d5.6.7.8/32 -ieth0 -oeth1 -jACCEPT;-s 1.2.3.4/32 -d 5.6.7.8/32 -i eth0 -o eth1 -p tcp -j ACCEPT;OK |