If the script is run with the -e option, the output messages show an
unnecessary white-space. This path fixes this mistake.
sudo ./nft-test.py -e
[...] "line 34: nft add rule -nnn arp test-arp input arp plen != {33-55} " [...]
^^^^
Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if line[1:].find("*") != -1:
continue
if need_fix_option:
- rule[0] = rule[0].rstrip()[1:]
+ rule[0] = rule[0].rstrip()[1:].strip()
result = rule_add(rule, table_list, chain_list, filename,
lineno, force_all_family_option)
tests += 1