diff options
author | Phil Sutter <phil@nwl.cc> | 2021-03-02 14:50:07 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-03-09 09:27:33 +0100 |
commit | 46f9d3a9a61ee80fa94b7fa7b3b36045c92606ae (patch) | |
tree | f14a80399d455fe8a40812449decd394021c62de /extensions/libxt_standard.t | |
parent | 330f5df03ad589b46865ceedf2a54cf10a4225ba (diff) |
xtables-translate: Fix translation of odd netmasks
Iptables supports netmasks which are not prefixes to match on (or
ignore) arbitrary bits in an address. Yet nftables' prefix notation is
available for real prefixes only, so translation is not as trivial -
print bitmask syntax for those cases.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libxt_standard.t')
-rw-r--r-- | extensions/libxt_standard.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/extensions/libxt_standard.t b/extensions/libxt_standard.t index 4313f7b7..56d6da2e 100644 --- a/extensions/libxt_standard.t +++ b/extensions/libxt_standard.t @@ -9,3 +9,15 @@ -j ACCEPT;=;OK -j RETURN;=;OK ! -p 0 -j ACCEPT;=;FAIL +-s 10.11.12.13/8;-s 10.0.0.0/8;OK +-s 10.11.12.13/9;-s 10.0.0.0/9;OK +-s 10.11.12.13/10;-s 10.0.0.0/10;OK +-s 10.11.12.13/11;-s 10.0.0.0/11;OK +-s 10.11.12.13/12;-s 10.0.0.0/12;OK +-s 10.11.12.13/30;-s 10.11.12.12/30;OK +-s 10.11.12.13/31;-s 10.11.12.12/31;OK +-s 10.11.12.13/32;-s 10.11.12.13/32;OK +-s 10.11.12.13/255.0.0.0;-s 10.0.0.0/8;OK +-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 |