summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Propellor/Property/Dns.hs7
-rw-r--r--Propellor/Types/Dns.hs1
2 files changed, 8 insertions, 0 deletions
diff --git a/Propellor/Property/Dns.hs b/Propellor/Property/Dns.hs
index e4dfb199..7abeb552 100644
--- a/Propellor/Property/Dns.hs
+++ b/Propellor/Property/Dns.hs
@@ -141,6 +141,7 @@ rField (CNAME _) = "CNAME"
rField (MX _ _) = "MX"
rField (NS _) = "NS"
rField (TXT _) = "TXT"
+rField (SRV _ _ _ _) = "SRV"
rValue :: Record -> String
rValue (Address (IPv4 addr)) = addr
@@ -148,6 +149,12 @@ rValue (Address (IPv6 addr)) = addr
rValue (CNAME d) = dValue d
rValue (MX pri d) = show pri ++ " " ++ dValue d
rValue (NS d) = dValue d
+rValue (SRV priority weight port target) = unwords
+ [ show priority
+ , show weight
+ , show port
+ , dValue target
+ ]
rValue (TXT s) = [q] ++ filter (/= q) s ++ [q]
where
q = '"'
diff --git a/Propellor/Types/Dns.hs b/Propellor/Types/Dns.hs
index 3bdd6c3a..9d801ef6 100644
--- a/Propellor/Types/Dns.hs
+++ b/Propellor/Types/Dns.hs
@@ -57,6 +57,7 @@ data Record
| MX Int BindDomain
| NS BindDomain
| TXT String
+ | SRV Word16 Word16 Word16 BindDomain
deriving (Read, Show, Eq, Ord)
getIPAddr :: Record -> Maybe IPAddr