summaryrefslogtreecommitdiff
path: root/Propellor/Types/Dns.hs
diff options
context:
space:
mode:
authorJoey Hess2014-04-18 17:38:21 -0400
committerJoey Hess2014-04-18 17:38:21 -0400
commit80caa6c09d8c15f0ed5d3ce147869b67c0c9f2a8 (patch)
treebe1b133d3675ddcf802ecdbc09e6547a845314e3 /Propellor/Types/Dns.hs
parent39d697ca789c04da07bb14cc7476899e717d9413 (diff)
my secondary dns server now uses Ip Attrs
Diffstat (limited to 'Propellor/Types/Dns.hs')
-rw-r--r--Propellor/Types/Dns.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Propellor/Types/Dns.hs b/Propellor/Types/Dns.hs
index 4b5925c1..026920fb 100644
--- a/Propellor/Types/Dns.hs
+++ b/Propellor/Types/Dns.hs
@@ -60,6 +60,10 @@ data Record
| TXT String
deriving (Read, Show, Eq, Ord)
+getIPAddr :: Record -> Maybe IPAddr
+getIPAddr (Address addr) = Just addr
+getIPAddr _ = Nothing
+
-- | Bind serial numbers are unsigned, 32 bit integers.
type SerialNumber = CInt