[Pkg-utopia-maintainers] Bug#693604: Any comments on 693604?
Vincent Danjean
vdanjean.ml at free.fr
Tue Dec 10 14:02:00 UTC 2013
tag 693604 +patch
thanks
Hi,
I see that you uploaded avahi 0.6.31-3 without addressing 693604.
693604 is an important bug with a proposed patch for a long time and
no avahi maintainer explains why they do not consider the patch.
I put the patch I use (taken from LP) to recompile avahi for
our server here again. And I'm adding the 'patch' tag that is missing
on the Debian bug. But, please, apply this patch or, at least, add
comments on the bug. Initialy, I was hopping that this bug would be
fixed in a point release of wheezy stable...
Regards,
Vincent
--
Vincent Danjean Adresse: Laboratoire LIG - Bât. INRIA Rhône-Alpes
Téléphone: +33 4 76 61 55 10 655 avenue de l'Europe
Fax: +33 4 76 61 52 52 Montbonnot Saint Martin
Email: Vincent.Danjean at imag.fr 38334 Saint-Ismier cedex
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 7b058c5..4aa4a72 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+avahi (0.6.31-3.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Add patch from LP: #1059286, Closes: #693604
+
+ -- Vincent Danjean <vdanjean at debian.org> Tue, 10 Dec 2013 14:48:15 +0100
+
avahi (0.6.31-3) unstable; urgency=low
* Team upload.
diff --git a/debian/patches/avahi-core-reserve-space-for-record-data-when-size-estimate.patch b/debian/patches/avahi-core-reserve-space-for-record-data-when-size-estimate.patch
new file mode 100644
index 0000000..5145b8c
--- /dev/null
+++ b/debian/patches/avahi-core-reserve-space-for-record-data-when-size-estimate.patch
@@ -0,0 +1,91 @@
+--- a/avahi-core/dns.c
++++ b/avahi-core/dns.c
+@@ -55,6 +55,7 @@
+
+ p->size = p->rindex = AVAHI_DNS_PACKET_HEADER_SIZE;
+ p->max_size = max_size;
++ p->res_size = 0;
+ p->name_table = NULL;
+ p->data = NULL;
+
+@@ -833,6 +834,25 @@
+ return p->max_size - p->size;
+ }
+
++size_t avahi_dns_packet_reserve_size(AvahiDnsPacket *p, size_t res_size) {
++ assert(p);
++
++ assert(p->size + p->res_size <= p->max_size);
++
++ if ((p->size + p->res_size + res_size) <= p->max_size)
++ p->res_size += res_size;
++
++ return p->res_size;
++}
++
++size_t avahi_dns_packet_reserved_space(AvahiDnsPacket *p) {
++ assert(p);
++
++ assert(p->size + p->res_size <= p->max_size);
++
++ return p->max_size - p->size - p->res_size;
++}
++
+ int avahi_rdata_parse(AvahiRecord *record, const void* rdata, size_t size) {
+ int ret;
+ AvahiDnsPacket p;
+--- a/avahi-core/dns.h
++++ b/avahi-core/dns.h
+@@ -30,7 +30,7 @@
+ #define AVAHI_DNS_PACKET_SIZE_MAX (AVAHI_DNS_PACKET_HEADER_SIZE + 256 + 2 + 2 + 4 + 2 + AVAHI_DNS_RDATA_MAX)
+
+ typedef struct AvahiDnsPacket {
+- size_t size, rindex, max_size;
++ size_t size, rindex, max_size, res_size;
+ AvahiHashmap *name_table; /* for name compression */
+ uint8_t *data;
+ } AvahiDnsPacket;
+@@ -78,6 +78,8 @@
+
+ int avahi_dns_packet_is_empty(AvahiDnsPacket *p);
+ size_t avahi_dns_packet_space(AvahiDnsPacket *p);
++size_t avahi_dns_packet_reserve_size(AvahiDnsPacket *p, size_t res_size);
++size_t avahi_dns_packet_reserved_space(AvahiDnsPacket *p);
+
+ #define AVAHI_DNS_FIELD_ID 0
+ #define AVAHI_DNS_FIELD_FLAGS 1
+--- a/avahi-core/probe-sched.c
++++ b/avahi-core/probe-sched.c
+@@ -179,7 +179,7 @@
+ avahi_record_get_estimate_size(pj->record);
+
+ /* Too large */
+- if (size > avahi_dns_packet_space(p))
++ if (size > avahi_dns_packet_reserved_space(p))
+ return 0;
+
+ /* Create the probe query */
+@@ -189,6 +189,9 @@
+ b = !!avahi_dns_packet_append_key(p, k, 0);
+ assert(b);
+
++ /* reserve size for record data */
++ avahi_dns_packet_reserve_size(p, avahi_record_get_estimate_size(pj->record));
++
+ /* Mark this job for addition to the packet */
+ pj->chosen = 1;
+
+@@ -202,9 +205,12 @@
+ continue;
+
+ /* This job wouldn't fit in */
+- if (avahi_record_get_estimate_size(pj->record) > avahi_dns_packet_space(p))
++ if (avahi_record_get_estimate_size(pj->record) > avahi_dns_packet_reserved_space(p))
+ break;
+
++ /* reserve size for record data */
++ avahi_dns_packet_reserve_size(p, avahi_record_get_estimate_size(pj->record));
++
+ /* Mark this job for addition to the packet */
+ pj->chosen = 1;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index e13167d..cf0bc53 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
# Debian patches for Avahi
01_avahi-daemon.conf.patch
no-deprecations.patch
+avahi-core-reserve-space-for-record-data-when-size-estimate.patch
More information about the Pkg-utopia-maintainers
mailing list