diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-10-04 13:10:59 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-10-04 13:10:59 -0400 |
| commit | 422435f505bf0c6c0e00dc85e0bfd2860b79100e (patch) | |
| tree | dc0c9ac9b7dee43628525520bd3806d468ad449e /src/Propellor/Property/Dns.hs | |
| parent | 7898079adb6caa2cb0da4384542f28bd1ce21011 (diff) | |
avoid propagating non-alias DNS info from container to host
* When the ipv4 and ipv6 properties are used with a container, avoid
propagating the address out to the host.
* DnsInfo has been replaced with DnsInfoPropagated and
DnsInfoUnpropagated. (API change)
* Code that used fromDnsInfo . fromInfo changes to use getDnsInfo.
* addDNS takes an additional Bool parameter to control whether
the DNS info should propagate out of containers. (API change)
This commit was sponsored by Trenton Cronholm on Patreon.
Diffstat (limited to 'src/Propellor/Property/Dns.hs')
| -rw-r--r-- | src/Propellor/Property/Dns.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/Dns.hs b/src/Propellor/Property/Dns.hs index 889aece5..d99a76b0 100644 --- a/src/Propellor/Property/Dns.hs +++ b/src/Propellor/Property/Dns.hs @@ -468,7 +468,7 @@ genZone inzdomain hostmap zdomain soa = -- So we can just use the IPAddrs. addcnames :: Host -> [Either WarningMessage (BindDomain, Record)] addcnames h = concatMap gen $ filter (inDomain zdomain) $ - mapMaybe getCNAME $ S.toList $ fromDnsInfo $ fromInfo info + mapMaybe getCNAME $ S.toList $ getDnsInfo info where info = hostInfo h gen c = case getAddresses info of @@ -483,7 +483,7 @@ genZone inzdomain hostmap zdomain soa = where info = hostInfo h l = zip (repeat $ AbsDomain $ hostName h) - (S.toList $ S.filter (\r -> isNothing (getIPAddr r) && isNothing (getCNAME r)) (fromDnsInfo $ fromInfo info)) + (S.toList $ S.filter (\r -> isNothing (getIPAddr r) && isNothing (getCNAME r)) (getDnsInfo info)) -- Simplifies the list of hosts. Remove duplicate entries. -- Also, filter out any CHAMES where the same domain has an @@ -531,7 +531,7 @@ genSSHFP domain h = concatMap mk . concat <$> (gen =<< get) gen = liftIO . mapM genSSHFP' . M.elems . fromMaybe M.empty mk r = mapMaybe (\d -> if inDomain domain d then Just (d, r) else Nothing) (AbsDomain hostname : cnames) - cnames = mapMaybe getCNAME $ S.toList $ fromDnsInfo $ fromInfo info + cnames = mapMaybe getCNAME $ S.toList $ getDnsInfo info hostname = hostName h info = hostInfo h |
