![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package ghc-dns for openSUSE:Factory checked in at 2016-11-04 21:01:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-dns (Old)
and /work/SRC/openSUSE:Factory/.ghc-dns.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-dns"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-dns/ghc-dns.changes 2016-10-22 13:21:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-dns.new/ghc-dns.changes 2016-11-04 21:01:11.000000000 +0100
@@ -1,0 +2,10 @@
+Thu Oct 27 15:55:21 UTC 2016 - psimons@suse.com
+
+- Update to version 2.0.8 with cabal2obs.
+
+-------------------------------------------------------------------
+Mon Oct 17 15:37:36 UTC 2016 - psimons@suse.com
+
+- Update to version 2.0.7 with cabal2obs.
+
+-------------------------------------------------------------------
Old:
----
dns-2.0.6.tar.gz
New:
----
dns-2.0.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-dns.spec ++++++
--- /var/tmp/diff_new_pack.lX9rdF/_old 2016-11-04 21:01:12.000000000 +0100
+++ /var/tmp/diff_new_pack.lX9rdF/_new 2016-11-04 21:01:12.000000000 +0100
@@ -19,7 +19,7 @@
%global pkg_name dns
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 2.0.6
+Version: 2.0.8
Release: 0
Summary: DNS library in Haskell
License: BSD-3-Clause
++++++ dns-2.0.6.tar.gz -> dns-2.0.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dns-2.0.6/Changelog new/dns-2.0.8/Changelog
--- old/dns-2.0.6/Changelog 2016-09-29 03:44:30.000000000 +0200
+++ new/dns-2.0.8/Changelog 2016-10-21 02:28:50.000000000 +0200
@@ -1,3 +1,7 @@
+2.0.8
+ - Better handling of encoding and decoding the "root" domain ".". [#45](https://github.com/kazu-yamamoto/dns/pull/45)
+2.0.7
+ - Add length checks for A and AAAA records. [#43](https://github.com/kazu-yamamoto/dns/pull/43)
2.0.6
- Adding Ord instance. [#41](https://github.com/kazu-yamamoto/dns/pull/41)
- Adding DNSSEC-related RRTYPEs [#40](https://github.com/kazu-yamamoto/dns/pull/40)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dns-2.0.6/Network/DNS/Decode.hs new/dns-2.0.8/Network/DNS/Decode.hs
--- old/dns-2.0.6/Network/DNS/Decode.hs 2016-09-29 03:44:30.000000000 +0200
+++ new/dns-2.0.8/Network/DNS/Decode.hs 2016-10-21 02:28:50.000000000 +0200
@@ -196,8 +196,12 @@
decodeRData TXT len = (RD_TXT . ignoreLength) <$> getNByteString len
where
ignoreLength = BS.tail
-decodeRData A len = (RD_A . toIPv4) <$> getNBytes len
-decodeRData AAAA len = (RD_AAAA . toIPv6b) <$> getNBytes len
+decodeRData A len
+ | len == 4 = (RD_A . toIPv4) <$> getNBytes len
+ | otherwise = fail "IPv4 addresses must be 4 bytes long"
+decodeRData AAAA len
+ | len == 16 = (RD_AAAA . toIPv6b) <$> getNBytes len
+ | otherwise = fail "IPv6 addresses must be 16 bytes long"
decodeRData SOA _ = RD_SOA <$> decodeDomain
<*> decodeDomain
<*> decodeSerial
@@ -265,7 +269,7 @@
let n = getValue c
-- Syntax hack to avoid using MultiWayIf
case () of
- _ | c == 0 -> return ""
+ _ | c == 0 -> return "." -- Perhaps the root domain?
_ | isPointer c -> do
d <- getInt8
let offset = n * 256 + d
@@ -281,7 +285,10 @@
_ | otherwise -> do
hs <- getNByteString n
ds <- decodeDomain
- let dom = hs `BS.append` "." `BS.append` ds
+ let dom =
+ case ds of -- avoid trailing ".."
+ "." -> hs `BS.append` "."
+ _ -> hs `BS.append` "." `BS.append` ds
push pos dom
return dom
where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dns-2.0.6/Network/DNS/Encode.hs new/dns-2.0.8/Network/DNS/Encode.hs
--- old/dns-2.0.6/Network/DNS/Encode.hs 2016-09-29 03:44:30.000000000 +0200
+++ new/dns-2.0.8/Network/DNS/Encode.hs 2016-10-21 02:28:50.000000000 +0200
@@ -201,9 +201,12 @@
----------------------------------------------------------------
+rootDomain :: Domain
+rootDomain = BS.pack "."
+
encodeDomain :: Domain -> SPut
encodeDomain dom
- | BS.null dom = put8 0
+ | (BS.null dom || dom == rootDomain) = put8 0
| otherwise = do
mpos <- wsPop dom
cur <- gets wsPosition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dns-2.0.6/dns.cabal new/dns-2.0.8/dns.cabal
--- old/dns-2.0.6/dns.cabal 2016-09-29 03:44:30.000000000 +0200
+++ new/dns-2.0.8/dns.cabal 2016-10-21 02:28:50.000000000 +0200
@@ -1,5 +1,5 @@
Name: dns
-Version: 2.0.6
+Version: 2.0.8
Author: Kazu Yamamoto