diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-15 21:22:23 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-15 21:29:03 -0400 |
| commit | 1f4904881019efe275ba0e80b6beb5a2355e0b23 (patch) | |
| tree | 042cb4af87819b5341e71cd701a63f384facd05b /src | |
| parent | f3f7bb19bb6f30f48ae6d7e272bc59b7fa8efd10 (diff) | |
documentation
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Dns.hs | 4 | ||||
| -rw-r--r-- | src/Propellor/Types/Dns.hs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Propellor/Property/Dns.hs b/src/Propellor/Property/Dns.hs index da063e0e..056733cd 100644 --- a/src/Propellor/Property/Dns.hs +++ b/src/Propellor/Property/Dns.hs @@ -28,7 +28,9 @@ import qualified Data.Map as M import qualified Data.Set as S import Data.List --- | Primary dns server for a domain. +-- | Primary dns server for a domain, using bind. +-- +-- Currently, this only configures bind to serve forward DNS, not reverse DNS. -- -- Most of the content of the zone file is configured by setting properties -- of hosts. For example, diff --git a/src/Propellor/Types/Dns.hs b/src/Propellor/Types/Dns.hs index 1c83854e..4a0dd805 100644 --- a/src/Propellor/Types/Dns.hs +++ b/src/Propellor/Types/Dns.hs @@ -96,12 +96,15 @@ data Record | PTR ReverseIP deriving (Read, Show, Eq, Ord, Typeable) +-- | An in-addr.arpa record corresponding to an IPAddr. type ReverseIP = String reverseIP :: IPAddr -> ReverseIP reverseIP (IPv4 addr) = intercalate "." (reverse $ split "." addr) ++ ".in-addr.arpa" reverseIP addr@(IPv6 _) = reverse (intersperse '.' $ replace ":" "" $ fromIPAddr $ canonicalIP addr) ++ ".ip6.arpa" +-- | Converts an IP address (particularly IPv6) to canonical, fully +-- expanded form. canonicalIP :: IPAddr -> IPAddr canonicalIP (IPv4 addr) = IPv4 addr canonicalIP (IPv6 addr) = IPv6 $ intercalate ":" $ map canonicalGroup $ split ":" $ replaceImplicitGroups addr |
