Propellor.Property.Firewall: fix Port datatype to iptable parameter translation
This commit is contained in:
parent
eaca662dc1
commit
fe2f95a43c
|
@ -44,8 +44,8 @@ toIpTable r = map Param $
|
||||||
toIpTableArg :: Rules -> [String]
|
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) = ["--dport", show port]
|
toIpTableArg (DPort (Port port)) = ["--dport", show port]
|
||||||
toIpTableArg (DPortRange (f,t)) = ["--dport", show f ++ ":" ++ show t]
|
toIpTableArg (DPortRange (Port f, Port 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'
|
||||||
|
|
Loading…
Reference in New Issue