[Pkg-utopia-commits] r1208 - in packages/unstable/avahi/debian: . patches

Sjoerd Simons sjoerd at alioth.debian.org
Sun Jan 7 19:41:50 CET 2007


Author: sjoerd
Date: 2007-01-07 19:41:50 +0100 (Sun, 07 Jan 2007)
New Revision: 1208

Added:
   packages/unstable/avahi/debian/patches/04_function_return.patch
   packages/unstable/avahi/debian/patches/05_dns_sd_dont_bump_soname.patch
   packages/unstable/avahi/debian/patches/06_dont_log_broken_packets.patch
   packages/unstable/avahi/debian/patches/07_ia64_unaligned_access.patch
   packages/unstable/avahi/debian/patches/08_unicast_ipv6_only.patch
   packages/unstable/avahi/debian/patches/09_fionread.patch
   packages/unstable/avahi/debian/patches/10_widearea_socket_types.patch
   packages/unstable/avahi/debian/patches/12_bogus_static_host_error_message.patch
   packages/unstable/avahi/debian/patches/13_NULL_dns_service_refs.patch
Modified:
   packages/unstable/avahi/debian/changelog
Log:
* debian/patches/04_function_return.patch
  - Added. Ensure a value is always returned from a non-void function (From
           upstream svn)
* debian/patches/05_dns_sd_dont_bump_soname.patch
  - Added. Undo the bumping of the micro soname version to keep the soname
           fully in sync with apple's (From upstream svn)
* debian/patches/06_dont_log_broken_packets.patch
  - Added. Don't log errors from recvmsg if there caused by broken ip
           packets. Fixes log flooding on machines with bad links (From
           upstream svn) (Closes: #386239)
* debian/patches/07_ia64_unaligned_access.patch
  - Added. Some fixes for unaligned accesses as seen on ia64 (From upstream
           svn)
* debian/patches/08_unicast_ipv6_only.patch
  - Added. Set the unicast ipv6 socket as ipv6 only, as the linux ipv4 in
           ipv6 misses some control info (From upstream svn)
* debian/patches/09_fionread.patch
  - Added. It's valid for FIONREAD so handle this instead of throwing a
           warning and failing (From upstream svn)
* debian/patches/10_widearea_socket_types.patch
  - Added. Only create a unicast ipv4 or ipv6 socket for widecast if
           respectively ipv4 or ipv6 is enabled. (From upstream svn)
* debian/patches/12_bogus_static_host_error_message.patch
  - Added. Prevent logging of bogus error message when adding static .local
           hosts. (from upstream svn)
* debian/patches/13_NULL_dns_service_refs.patch
  - Added. Let the bonjour compatibility layer handle NULL services
           references gracefully and don't use the service reference after
           unreffing it.  (From upstream svn)

Modified: packages/unstable/avahi/debian/changelog
===================================================================
--- packages/unstable/avahi/debian/changelog	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/changelog	2007-01-07 18:41:50 UTC (rev 1208)
@@ -13,8 +13,37 @@
     - Don't run if resolvconf is installed
   * debian/avahi-daemon.resolvconf
     - Added. Hook script for resolvconf
+  * debian/patches/04_function_return.patch
+    - Added. Ensure a value is always returned from a non-void function (From
+             upstream svn)
+  * debian/patches/05_dns_sd_dont_bump_soname.patch
+    - Added. Undo the bumping of the micro soname version to keep the soname
+             fully in sync with apple's (From upstream svn)
+  * debian/patches/06_dont_log_broken_packets.patch
+    - Added. Don't log errors from recvmsg if there caused by broken ip
+             packets. Fixes log flooding on machines with bad links (From
+             upstream svn) (Closes: #386239)
+  * debian/patches/07_ia64_unaligned_access.patch
+    - Added. Some fixes for unaligned accesses as seen on ia64 (From upstream
+             svn)
+  * debian/patches/08_unicast_ipv6_only.patch
+    - Added. Set the unicast ipv6 socket as ipv6 only, as the linux ipv4 in
+             ipv6 misses some control info (From upstream svn)
+  * debian/patches/09_fionread.patch
+    - Added. It's valid for FIONREAD so handle this instead of throwing a
+             warning and failing (From upstream svn)
+  * debian/patches/10_widearea_socket_types.patch
+    - Added. Only create a unicast ipv4 or ipv6 socket for widecast if
+             respectively ipv4 or ipv6 is enabled. (From upstream svn)
+  * debian/patches/12_bogus_static_host_error_message.patch
+    - Added. Prevent logging of bogus error message when adding static .local
+             hosts. (from upstream svn)
+  * debian/patches/13_NULL_dns_service_refs.patch
+    - Added. Let the bonjour compatibility layer handle NULL services
+             references gracefully and don't use the service reference after
+             unreffing it.  (From upstream svn)
 
- -- Sjoerd Simons <sjoerd at debian.org>  Wed,  3 Jan 2007 11:22:59 +0100
+ -- Sjoerd Simons <sjoerd at debian.org>  Sun,  7 Jan 2007 15:32:56 +0100
 
 avahi (0.6.16-1) unstable; urgency=low
 

Added: packages/unstable/avahi/debian/patches/04_function_return.patch
===================================================================
--- packages/unstable/avahi/debian/patches/04_function_return.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/04_function_return.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,19 @@
+------------------------------------------------------------------------
+r1353 | lathiat | 2006-12-29 13:50:03 +0100 (Fri, 29 Dec 2006) | 2 lines
+
+ * Make sure we return -1 if we fall of the end of consume_labels()
+
+------------------------------------------------------------------------
+Index: avahi-core/dns.c
+===================================================================
+--- avahi-core/dns.c	(revision 1352)
++++ avahi-core/dns.c	(revision 1353)
+@@ -400,6 +400,8 @@
+         } else
+             return -1;
+     }
++
++    return -1;
+ }
+ 
+ int avahi_dns_packet_consume_name(AvahiDnsPacket *p, char *ret_name, size_t l) {

Added: packages/unstable/avahi/debian/patches/05_dns_sd_dont_bump_soname.patch
===================================================================
--- packages/unstable/avahi/debian/patches/05_dns_sd_dont_bump_soname.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/05_dns_sd_dont_bump_soname.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,21 @@
+------------------------------------------------------------------------
+r1354 | lathiat | 2006-12-29 13:55:23 +0100 (Fri, 29 Dec 2006) | 4 lines
+
+ * Un-bump DNS-SD soname, we are following apple's version so we 
+shouldn't bump it (woops)
+
+
+------------------------------------------------------------------------
+Index: configure.ac
+===================================================================
+--- configure.ac	(revision 1353)
++++ configure.ac	(revision 1354)
+@@ -34,7 +34,7 @@
+ AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:1:0])
+ AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:1:0])
+ AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:1:0])
+-AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:1:0])
++AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
+ AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
+ AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])
+ 

Added: packages/unstable/avahi/debian/patches/06_dont_log_broken_packets.patch
===================================================================
--- packages/unstable/avahi/debian/patches/06_dont_log_broken_packets.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/06_dont_log_broken_packets.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,62 @@
+------------------------------------------------------------------------
+r1361 | lennart | 2006-12-31 18:33:57 +0100 (Sun, 31 Dec 2006) | 2 lines
+
+Ignore EAGAIN errors on recvmsg() (Closes #60)
+
+------------------------------------------------------------------------
+Index: avahi-core/socket.c
+===================================================================
+--- avahi-core/socket.c	(revision 1360)
++++ avahi-core/socket.c	(revision 1361)
+@@ -635,6 +635,9 @@
+         goto fail;
+     }
+ 
++    if (ms <= 0)
++        goto fail;
++
+     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+ 
+     io.iov_base = AVAHI_DNS_PACKET_DATA(p);
+@@ -650,7 +653,14 @@
+     msg.msg_flags = 0;
+     
+     if ((l = recvmsg(fd, &msg, 0)) < 0) {
+-        avahi_log_warn("recvmsg(): %s", strerror(errno));
++        /* Linux returns EAGAIN when an invalid IP packet has been
++        recieved. We suppress warnings in this case because this might
++        create quite a bit of log traffic on machines with unstable
++        links. (See #60) */
++
++        if (errno != EAGAIN)
++            avahi_log_warn("recvmsg(): %s", strerror(errno));
++
+         goto fail;
+     }
+ 
+@@ -768,6 +778,9 @@
+         avahi_log_warn("ioctl(): %s", strerror(errno));
+         goto fail;
+     }
++
++    if (ms <= 0)
++        goto fail;
+     
+     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+ 
+@@ -785,7 +798,14 @@
+     msg.msg_flags = 0;
+     
+     if ((l = recvmsg(fd, &msg, 0)) < 0) {
+-        avahi_log_warn("recvmsg(): %s", strerror(errno));
++        /* Linux returns EAGAIN when an invalid IP packet has been
++        recieved. We suppress warnings in this case because this might
++        create quite a bit of log traffic on machines with unstable
++        links. (See #60) */
++
++        if (errno != EAGAIN)
++            avahi_log_warn("recvmsg(): %s", strerror(errno));
++        
+         goto fail;
+     }
+ 

Added: packages/unstable/avahi/debian/patches/07_ia64_unaligned_access.patch
===================================================================
--- packages/unstable/avahi/debian/patches/07_ia64_unaligned_access.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/07_ia64_unaligned_access.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,31 @@
+------------------------------------------------------------------------
+r1363 | lennart | 2007-01-05 00:53:39 +0100 (Fri, 05 Jan 2007) | 1 line
+
+Some more ia64 fixes. (Closes #90)
+------------------------------------------------------------------------
+Index: avahi-core/socket.c
+===================================================================
+--- avahi-core/socket.c	(revision 1362)
++++ avahi-core/socket.c	(revision 1363)
+@@ -475,10 +475,10 @@
+     struct iovec io;
+ #ifdef IP_PKTINFO
+     struct cmsghdr *cmsg;
+-    uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in_pktinfo))];
++    size_t cmsg_data[( CMSG_SPACE(sizeof(struct in_pktinfo)) / sizeof(size_t)) + 1];
+ #elif defined(IP_SENDSRCADDR)
+     struct cmsghdr *cmsg;
+-    uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in_addr))];
++    size_t cmsg_data[( CMSG_SPACE(sizeof(struct in_addr)) / sizeof(size_t)) + 1];
+ #endif
+ 
+     assert(fd >= 0);
+@@ -565,7 +565,7 @@
+     struct msghdr msg;
+     struct iovec io;
+     struct cmsghdr *cmsg;
+-    uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in6_pktinfo))];
++    size_t cmsg_data[(CMSG_SPACE(sizeof(struct in6_pktinfo))/sizeof(size_t)) + 1];
+ 
+     assert(fd >= 0);
+     assert(p);

Added: packages/unstable/avahi/debian/patches/08_unicast_ipv6_only.patch
===================================================================
--- packages/unstable/avahi/debian/patches/08_unicast_ipv6_only.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/08_unicast_ipv6_only.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,31 @@
+------------------------------------------------------------------------
+r1370 | lennart | 2007-01-06 17:10:01 +0100 (Sat, 06 Jan 2007) | 3 lines
+
+* set IPV6_V6ONLY for unicast DNS sockets, too
+
+------------------------------------------------------------------------
+Index: avahi-core/socket.c
+===================================================================
+--- avahi-core/socket.c	(revision 1369)
++++ avahi-core/socket.c	(revision 1370)
+@@ -912,13 +937,19 @@
+ 
+ int avahi_open_unicast_socket_ipv6(void) {
+     struct sockaddr_in6 local;
+-    int fd = -1;
++    int fd = -1, yes;
+         
+     if ((fd = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
+         avahi_log_warn("socket() failed: %s", strerror(errno));
+         goto fail;
+     }
+     
++    yes = 1;
++    if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &yes, sizeof(yes)) < 0) {
++        avahi_log_warn("IPV6_V6ONLY failed: %s", strerror(errno));
++        goto fail;
++    }
++
+     memset(&local, 0, sizeof(local));
+     local.sin6_family = AF_INET6;
+     

Added: packages/unstable/avahi/debian/patches/09_fionread.patch
===================================================================
--- packages/unstable/avahi/debian/patches/09_fionread.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/09_fionread.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,32 @@
+r1370 | lennart | 2007-01-06 17:10:01 +0100 (Sat, 06 Jan 2007) | 3 lines
+
+* print a warning when FIONREAD returns an invalid size
+
+Index: avahi-core/socket.c
+===================================================================
+--- avahi-core/socket.c	(revision 1369)
++++ avahi-core/socket.c	(revision 1370)
+@@ -635,8 +649,10 @@
+         goto fail;
+     }
+ 
+-    if (ms <= 0)
++    if (ms < 0) {
++        avahi_log_warn("FIONREAD returned negative value.");
+         goto fail;
++    }
+ 
+     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+ 
+@@ -779,8 +802,10 @@
+         goto fail;
+     }
+ 
+-    if (ms <= 0)
++    if (ms < 0) {
++        avahi_log_warn("FIONREAD returned negative value.");
+         goto fail;
++    }
+     
+     p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
+ 

Added: packages/unstable/avahi/debian/patches/10_widearea_socket_types.patch
===================================================================
--- packages/unstable/avahi/debian/patches/10_widearea_socket_types.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/10_widearea_socket_types.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,21 @@
+------------------------------------------------------------------------
+r1371 | lennart | 2007-01-06 17:10:47 +0100 (Sat, 06 Jan 2007) | 2 lines
+
+create unicast IPv4 socket oly if IPv4 is enabled, same for unicast IPv6
+
+------------------------------------------------------------------------
+Index: avahi-core/wide-area.c
+===================================================================
+--- avahi-core/wide-area.c	(revision 1370)
++++ avahi-core/wide-area.c	(revision 1371)
+@@ -579,8 +579,8 @@
+     e->cleanup_dead = 0;
+ 
+     /* Create sockets */
+-    e->fd_ipv4 = avahi_open_unicast_socket_ipv4();
+-    e->fd_ipv6 = avahi_open_unicast_socket_ipv6();
++    e->fd_ipv4 = s->config.use_ipv4 ? avahi_open_unicast_socket_ipv4() : -1;
++    e->fd_ipv6 = s->config.use_ipv6 ? avahi_open_unicast_socket_ipv6() : -1;
+ 
+     if (e->fd_ipv4 < 0 && e->fd_ipv6 < 0) {
+         avahi_log_error(__FILE__": Failed to create wide area sockets: %s", strerror(errno));

Added: packages/unstable/avahi/debian/patches/12_bogus_static_host_error_message.patch
===================================================================
--- packages/unstable/avahi/debian/patches/12_bogus_static_host_error_message.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/12_bogus_static_host_error_message.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,20 @@
+--- avahi-daemon/static-hosts.c.orig	2006-12-26 11:42:17.000000000 +0100
++++ avahi-daemon/static-hosts.c	2007-01-07 19:18:27.000000000 +0100
+@@ -114,7 +114,7 @@
+ 
+     if (!h->group)
+         if (!(h->group = avahi_s_entry_group_new (avahi_server, entry_group_callback, h))) {
+-            avahi_log_error("avahi_s_entry_group_new() failed: %s", avahi_strerror(err));
++            avahi_log_error("avahi_s_entry_group_new() failed: %s", avahi_strerror(avahi_server_errno(avahi_server)));
+             return;
+         }
+ 
+@@ -123,7 +123,7 @@
+         return;
+     }
+ 
+-    if ((err = avahi_server_add_address(avahi_server, h->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, h->host, &a))) {
++    if ((err = avahi_server_add_address(avahi_server, h->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, h->host, &a)) < 0) {
+         avahi_log_error ("Static host name %s: avahi_server_add_address failure: %s", h->host, avahi_strerror(err));
+         return;
+     }

Added: packages/unstable/avahi/debian/patches/13_NULL_dns_service_refs.patch
===================================================================
--- packages/unstable/avahi/debian/patches/13_NULL_dns_service_refs.patch	2007-01-07 16:54:56 UTC (rev 1207)
+++ packages/unstable/avahi/debian/patches/13_NULL_dns_service_refs.patch	2007-01-07 18:41:50 UTC (rev 1208)
@@ -0,0 +1,112 @@
+------------------------------------------------------------------------
+r1374 | lennart | 2007-01-06 17:51:42 +0100 (Sat, 06 Jan 2007) | 3 lines
+
+* handle NULL sdrefs gracefully.
+* fix mutex locking order in DNSProcessResult
+
+------------------------------------------------------------------------
+Index: avahi-compat-libdns_sd/compat.c
+===================================================================
+--- avahi-compat-libdns_sd/compat.c	(revision 1373)
++++ avahi-compat-libdns_sd/compat.c	(revision 1374)
+@@ -469,25 +469,26 @@
+ }
+ 
+ int DNSSD_API DNSServiceRefSockFD(DNSServiceRef sdref) {
++
++    AVAHI_WARN_LINKAGE;
++    
+     if (!sdref || sdref->n_ref <= 0)
+         return -1;
+ 
+-    AVAHI_WARN_LINKAGE;
+-    
+     return sdref->main_fd;
+ }
+ 
+ DNSServiceErrorType DNSSD_API DNSServiceProcessResult(DNSServiceRef sdref) {
+     DNSServiceErrorType ret = kDNSServiceErr_Unknown;
+ 
+-    assert(sdref);
+-    assert(sdref->n_ref >= 1);
+-    
+     AVAHI_WARN_LINKAGE;
+ 
++    if (!sdref || sdref->n_ref <= 0)
++        return kDNSServiceErr_BadParam;
++    
++    sdref_ref(sdref);
++
+     ASSERT_SUCCESS(pthread_mutex_lock(&sdref->mutex));
+-
+-    sdref_ref(sdref);
+     
+     /* Cleanup notification socket */
+     if (read_command(sdref->main_fd) != COMMAND_POLL_DONE)
+@@ -512,10 +513,10 @@
+     
+ finish:
+ 
++    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
++    
+     sdref_unref(sdref);
+ 
+-    ASSERT_SUCCESS(pthread_mutex_unlock(&sdref->mutex));
+-    
+     return ret;
+ }
+ 
+@@ -613,7 +614,6 @@
+ 
+     if (!ret_sdref)
+         return kDNSServiceErr_BadParam;
+-
+     *ret_sdref = NULL;
+ 
+     assert(regtype);
+@@ -739,7 +739,10 @@
+ 
+     AVAHI_WARN_LINKAGE;
+ 
+-    assert(ret_sdref);
++    if (!ret_sdref)
++        return kDNSServiceErr_BadParam;
++    *ret_sdref = NULL;
++
+     assert(name);
+     assert(regtype);
+     assert(domain);
+@@ -853,7 +856,10 @@
+ 
+     AVAHI_WARN_LINKAGE;
+ 
+-    assert(ret_sdref);
++    if (!ret_sdref)
++        return kDNSServiceErr_BadParam;
++    *ret_sdref = NULL;
++
+     assert(callback);
+ 
+     if (interface == kDNSServiceInterfaceIndexLocalOnly ||
+@@ -1096,7 +1102,6 @@
+ 
+     if (!ret_sdref)
+         return kDNSServiceErr_BadParam;
+-
+     *ret_sdref = NULL;
+     
+     if (!regtype)
+@@ -1210,10 +1215,12 @@
+ 
+     int ret = kDNSServiceErr_Unknown;
+     AvahiStringList *txt = NULL;
+-    assert(sdref);
+ 
+     AVAHI_WARN_LINKAGE;
+ 
++    if (!sdref || sdref->n_ref <= 0)
++        return kDNSServiceErr_BadParam;
++
+     if (flags || rref) {
+         AVAHI_WARN_UNSUPPORTED;
+         return kDNSServiceErr_Unsupported;




More information about the Pkg-utopia-commits mailing list