[oe-commits] Koen Kooi : libnss-mdns: support ipv6 in lookups

git at git.openembedded.org git at git.openembedded.org
Thu Jul 10 16:40:13 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: fdb5aaabea9e32d687c055ca25506dcffbb37867
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=fdb5aaabea9e32d687c055ca25506dcffbb37867

Author: Koen Kooi <koen at dominion.thruhere.net>
Date:   Tue Jul  8 16:35:26 2014 +0200

libnss-mdns: support ipv6 in lookups

It nothing can resolve the hostname as ipv4 it will also try ipv6.
Ideally the mdns4_minimal should get replaced as well, but there's some
handwaving on the internet stating it will slow things down if your ipv6
network is misconfigured.
Since I can't verify that slowdown I've opted for the safe way and only
do ipv6 lookup in the fallback entry.

Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 5b8c700..df7d196 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -26,13 +26,13 @@ DEBIANNAME_${PN} = "libnss-mdns"
 RDEPENDS_${PN} = "avahi-daemon"
 
 pkg_postinst_${PN} () {
-	sed -e '/^hosts:/s/\s*\<mdns4\>//' \
-		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns4\5/' \
+	sed -e '/^hosts:/s/\s*\<mdns\>//' \
+		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 mdns4_minimal [NOTFOUND=return]\3\4 mdns\5/' \
 		-i $D/etc/nsswitch.conf
 }
 
 pkg_prerm_${PN} () {
-	sed -e '/^hosts:/s/\s*\<mdns4\>//' \
+	sed -e '/^hosts:/s/\s*\<mdns\>//' \
 		-e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
 		-i $D/etc/nsswitch.conf
 }



More information about the Openembedded-commits mailing list