Skip to contentSkip to conversation

libnss-mdns: enable IPv6 as well as IPv4 mnds resolving

RFC PATCH In review [email protected] 2 participants 2 messages Dec 29, 2012 – Jan 3, 2013

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 libnss-mdns: enable IPv6 as well as IPv4 mnds resolving

From: Koen Kooi <[email protected]>

From the docs: "libnss_mdns.so.2 resolves both IPv6 and IPv4 addresses, libnss_mdns4.so.2 only IPv4 addresses and libnss_mdns6.so.2 only IPv6 addresses."

---
 .../libnss-mdns/libnss-mdns_0.10.bb                |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +5 -5
index a1f2f9a..ae11487 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "avahi"
 RDEPENDS_${PN} = "avahi-daemon"
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
 
@@ -24,13 +24,13 @@ DEBIANNAME_${PN} = "libnss-mdns"
 EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi"
 
 pkg_postinst_${PN} () {
-if ! grep -q '^hosts:.*\<mdns4\>' $D/etc/nsswitch.conf; then
-	sed -e 's/^hosts:.*/& mdns4/' -i $D/etc/nsswitch.conf
+if ! grep -q '^hosts:.*\<mdns\>' $D/etc/nsswitch.conf; then
+	sed -e 's/^hosts:.*/& mdns/' -i $D/etc/nsswitch.conf
 fi
 }
 
 pkg_prerm_${PN} () {
-if grep -q '^hosts:.*\<mdns4\>' /etc/nsswitch.conf; then
-	sed -e '/^hosts:/s/\s\<mdns4\>//' -i /etc/nsswitch.conf
+if grep -q '^hosts:.*\<mdns\>' /etc/nsswitch.conf; then
+	sed -e '/^hosts:/s/\s\<mdns\>//' -i /etc/nsswitch.conf
 fi
 }
Signature · 1 line
1.7.7.6
#1 lore raw
Quoted 28 lines · On 12/29/2012 11:50 AM, [email protected] wrote:

From: Koen Kooi <[email protected]>

Quoted 1 line

From the docs: "libnss_mdns.so.2 resolves both IPv6 and IPv4 addresses, libnss_mdns4.so.2 only IPv4 addresses and libnss_mdns6.so.2 only IPv6 addresses."

---
  .../libnss-mdns/libnss-mdns_0.10.bb                |   10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +1 -3
index a1f2f9a..ae11487 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
  DEPENDS = "avahi"
  RDEPENDS_${PN} = "avahi-daemon"
-PR = "r5"
+PR = "r6"
 
  SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
 
@@ -24,13 +24,13 @@ DEBIANNAME_${PN} = "libnss-mdns"
  EXTRA_OECONF = "--libdir=${base_libdir} --disable-lynx --enable-avahi"
 
  pkg_postinst_${PN} () {
-if ! grep -q '^hosts:.*\<mdns4\>' $D/etc/nsswitch.conf; then
-	sed -e 's/^hosts:.*/& mdns4/' -i $D/etc/nsswitch.conf

meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb DEBIANNAME_${PN} = "libnss-mdns" · line 34

Quoted 10 lines
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +4 -2
+if ! grep -q '^hosts:.*\<mdns\>' $D/etc/nsswitch.conf; then
+	sed -e 's/^hosts:.*/& mdns/' -i $D/etc/nsswitch.conf
  fi
  }
 
  pkg_prerm_${PN} () {
-if grep -q '^hosts:.*\<mdns4\>' /etc/nsswitch.conf; then
-	sed -e '/^hosts:/s/\s\<mdns4\>//' -i /etc/nsswitch.conf
+if grep -q '^hosts:.*\<mdns\>' /etc/nsswitch.conf; then
+	sed -e '/^hosts:/s/\s\<mdns\>//' -i /etc/nsswitch.conf

There were some other changes made to this recently, can you please have a look at the current version, it now uses the mdns4_minimal

Thanks
Sau!

Quoted 3 lines
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +0 -0
  fi
  }