k 3 iptables: allow REDIRECT target
This commit is contained in:
parent
4d3e713198
commit
7023d41410
@ -20,6 +20,7 @@ let
|
|||||||
flatten
|
flatten
|
||||||
length
|
length
|
||||||
hasAttr
|
hasAttr
|
||||||
|
hasPrefix
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
mkOption
|
mkOption
|
||||||
mkIf
|
mkIf
|
||||||
@ -123,7 +124,7 @@ let
|
|||||||
|
|
||||||
buildRule = tn: cn: rule:
|
buildRule = tn: cn: rule:
|
||||||
#target validation test:
|
#target validation test:
|
||||||
assert (elem rule.target ([ "ACCEPT" "REJECT" "DROP" "QUEUE" "LOG" "RETURN" ] ++ (attrNames ts."${tn}")));
|
assert (elem rule.target ([ "ACCEPT" "REJECT" "DROP" "QUEUE" "LOG" "RETURN" ] ++ (attrNames ts."${tn}"))) || hasPrefix "REDIRECT" rule.target;
|
||||||
|
|
||||||
#predicate validation test:
|
#predicate validation test:
|
||||||
#maybe use iptables-test
|
#maybe use iptables-test
|
||||||
|
Loading…
Reference in New Issue
Block a user