diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-02-26 16:48:26 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-02-26 16:48:26 -0400 |
| commit | aa225472fb586486b5839e5362a555a476e9a45d (patch) | |
| tree | c032200efff9476e2c34bcef40b228524b6631ed /src/Propellor/Property/Firewall.hs | |
| parent | ae7359a0b0cf58ec83a7ea80fc51d4e6f5be72bf (diff) | |
convert fromIPAddr to val
Diffstat (limited to 'src/Propellor/Property/Firewall.hs')
| -rw-r--r-- | src/Propellor/Property/Firewall.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Propellor/Property/Firewall.hs b/src/Propellor/Property/Firewall.hs index ab667da3..736a4458 100644 --- a/src/Propellor/Property/Firewall.hs +++ b/src/Propellor/Property/Firewall.hs @@ -99,7 +99,7 @@ toIpTableArg (NotDestination ipwm) = ] toIpTableArg (NatDestination ip mport) = [ "--to-destination" - , fromIPAddr ip ++ maybe "" (\p -> ":" ++ val p) mport + , val ip ++ maybe "" (\p -> ":" ++ val p) mport ] toIpTableArg (r :- r') = toIpTableArg r <> toIpTableArg r' @@ -107,9 +107,9 @@ data IPWithMask = IPWithNoMask IPAddr | IPWithIPMask IPAddr IPAddr | IPWithNumMa deriving (Eq, Show) instance ConfigurableValue IPWithMask where - val (IPWithNoMask ip) = fromIPAddr ip - val (IPWithIPMask ip ipm) = fromIPAddr ip ++ "/" ++ fromIPAddr ipm - val (IPWithNumMask ip m) = fromIPAddr ip ++ "/" ++ show m + val (IPWithNoMask ip) = val ip + val (IPWithIPMask ip ipm) = val ip ++ "/" ++ val ipm + val (IPWithNumMask ip m) = val ip ++ "/" ++ val m data Rule = Rule { ruleChain :: Chain |
