]> www.average.org Git - pdns-pipe-nmc.git/commitdiff
Revert "wip TLSA"
authorEugene Crosser <crosser@average.org>
Wed, 30 Apr 2014 19:38:43 +0000 (23:38 +0400)
committerEugene Crosser <crosser@average.org>
Wed, 30 Apr 2014 19:38:43 +0000 (23:38 +0400)
This reverts commit 518fb5e9066cb2f77cd3291289d85c00cbee0ffb.
The approach of delayed conversion will be abandoned, and the
conversion of both SRV and TLSA into the final format in the
"map" will be moved to the JSON parser.

NmcTransform.hs

index 64210eb288f72ec1681cec5757ac7fe8035d8489..cf93db38f7793bb7725d51e2b44573cfce7a4197 100644 (file)
@@ -102,30 +102,6 @@ expandSrv base =
                    && srvPort sr == 25
                 then Just [(show (srvPrio sr)) ++ "\t" ++ (srvHost sr)]
                 else Nothing
                    && srvPort sr == 25
                 then Just [(show (srvPrio sr)) ++ "\t" ++ (srvHost sr)]
                 else Nothing
-{-
--- | replace Tls with Tlsa down in the Map
---   This function is almost, but not quite, entirely unlike expandSrv.
-expandTls :: NmcDom -> NmcDom
-expandTls base =
-  let
-    base' = base { domTls = Nothing }
-  in
-    case domTls base of
-      Nothing -> base'
-      Just sl -> foldr addTlsa base' sl
-        where
-          addTlsa sr acc = sub1 `mergeNmcDom` acc
-            where
-              sub1 = def { domMap = Just (singleton proto sub2) }
-              sub2 = def { domMap = Just (singleton port sub3) }
-              sub3 = def { domTlsa = Just [tlsStr] }
-              proto = "_" ++ (tlsProto sr)
-              port = "_" ++ (tlsName sr)
-              tlsStr =  (show (tlsPrio sr)) ++ "\t"
-                     ++ (show (tlsWeight sr)) ++ " "
-                     ++ (show (tlsPort sr)) ++ " "
-                     ++ (tlsHost sr)
--}
 
 -- | Convert map elements of the form "subN...sub2.sub1.dom.bit"
 --   into nested map and merge it
 
 -- | Convert map elements of the form "subN...sub2.sub1.dom.bit"
 --   into nested map and merge it