better comply with propellor's layout style
This commit is contained in:
parent
f4abc3c1cb
commit
3ee61b70bb
|
@ -45,10 +45,14 @@ toIpTableArg :: Rules -> [String]
|
||||||
toIpTableArg Everything = []
|
toIpTableArg Everything = []
|
||||||
toIpTableArg (Proto proto) = ["-p", map toLower $ show proto]
|
toIpTableArg (Proto proto) = ["-p", map toLower $ show proto]
|
||||||
toIpTableArg (DPort (Port port)) = ["--dport", show port]
|
toIpTableArg (DPort (Port port)) = ["--dport", show port]
|
||||||
toIpTableArg (DPortRange
|
toIpTableArg (DPortRange (Port f, Port t)) =
|
||||||
(Port f, Port t)) = ["--dport", show f ++ ":" ++ show t]
|
["--dport", show f ++ ":" ++ show t]
|
||||||
toIpTableArg (IFace iface) = ["-i", iface]
|
toIpTableArg (IFace iface) = ["-i", iface]
|
||||||
toIpTableArg (Ctstate states) = ["-m", "conntrack","--ctstate", concat $ intersperse "," (map show states)]
|
toIpTableArg (Ctstate states) =
|
||||||
|
[ "-m"
|
||||||
|
, "conntrack"
|
||||||
|
, "--ctstate", concat $ intersperse "," (map show states)
|
||||||
|
]
|
||||||
toIpTableArg (r :- r') = toIpTableArg r <> toIpTableArg r'
|
toIpTableArg (r :- r') = toIpTableArg r <> toIpTableArg r'
|
||||||
|
|
||||||
data Rule = Rule
|
data Rule = Rule
|
||||||
|
|
Loading…
Reference in New Issue