summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-11-15 13:19:48 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-11-15 13:19:48 +0100
commit59e8114c6792242e80785f4461d5e663fb9a3d64 (patch)
tree9dfcf7b635697f8b06492376b8660aeaf5b77be1 /extensions
parent648fd1ad68ae2ec675ac07efee80783912535404 (diff)
iptables: fix longopt reecognition and workaround getopt(3) behavior
* On the first call to getopt, opts was NULL, so long options would not be recognized until a match/target was loaded. Whacky getopt behavior: * If the longopts parameter is NULL, getopt fails to recognize unknown options, such that `iptables-multi main --append` will print a garbage help message ("main needs an argument"). * If the longopts parameter is NULL on the first call, but not on subsequent calls, it completely screws up option parsing, taking the --dport in `iptables-multi main -A INPUT -p tcp --dport 1000` as --destination instead, but not accepting "--destination 1.2.3.4" either. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions')
0 files changed, 0 insertions, 0 deletions