summaryrefslogtreecommitdiff
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorbmouring@ni.com <bmouring@ni.com>2016-01-25 08:49:20 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-26 22:31:09 +0000
commit72027dea342a6f3a9fe35f1a04ce59728e21863a (patch)
tree153f9a062b3083b53ae29082e66e1d3fcffd19b4 /meta/recipes-connectivity
parentffd00f9a733a260f1f2b802662c45c1ec8c86c2f (diff)
downloadopenembedded-core-72027dea342a6f3a9fe35f1a04ce59728e21863a.tar.gz
openembedded-core-72027dea342a6f3a9fe35f1a04ce59728e21863a.tar.bz2
openembedded-core-72027dea342a6f3a9fe35f1a04ce59728e21863a.zip
avahi: Add patch to fix Win10 mDNS issues
Windows 10 will respond to mDNS messages when it really shouldn't, resulting in a lot of logging. Pulling the change from avahi upstream. This will be fixed in avahi 0.6.32 External References: https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1342400 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794145 https://bugzilla.redhat.com/show_bug.cgi?id=1240711 https://social.technet.microsoft.com/Forums/en-US/b334e797-ef80-4525-b74a-b4830420a14e/windows-10-spams-network-with-invalid-mdns-response-packets?forum=win10itpronetworking Signed-off-by: Brad Mouring <brad.mouring@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/avahi/avahi.inc1
-rw-r--r--meta/recipes-connectivity/avahi/files/0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch158
2 files changed, 159 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 825197d610..3d22e4cd77 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -27,6 +27,7 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
file://out-of-tree.patch \
file://0001-avahi-fix-avahi-status-command-error-prompt.patch \
file://reuseport-check.patch \
+ file://0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch \
"
USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
diff --git a/meta/recipes-connectivity/avahi/files/0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch b/meta/recipes-connectivity/avahi/files/0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch
new file mode 100644
index 0000000000..25a0a0e40f
--- /dev/null
+++ b/meta/recipes-connectivity/avahi/files/0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch
@@ -0,0 +1,158 @@
+From de7cde877e4daa5d9d4fb5b1a349299eaa94969d Mon Sep 17 00:00:00 2001
+From: Trent Lloyd <trent@lloyd.id.au>
+Date: Sat, 10 Oct 2015 06:20:46 +0800
+Subject: [PATCH] Don't log warnings about invalid packets (Fixes
+ lathiat/avahi#10)
+
+Various invalid packets would generate a warning, in particular
+Windows 10 generates response packets with no answer records and
+generally seemingly empty. Unsure why at this stage.
+
+This results in spamming syslog quite a lot on busy networks,
+similar issues like this have occured over time due to changes
+in various operating systems and specs (e.g. Avahi #284, #282)
+
+Rather than just disable this single message or case, I have
+pre-emptively turned the majority of these bad packet messages
+into debug messages. They can still be output on production
+builds if reuqired using the --debug option (no rebuild required).
+
+External References:
+https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1342400
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794145
+https://bugzilla.redhat.com/show_bug.cgi?id=1240711
+
+Pulled from git://github.com/lathiat/avahi de7cde87, which
+is slated for avahi 0.6.32.
+
+Signed-off-by: Brad Mouring <brad.mouring@ni.com>
+Upstream-Status: Backport
+
+---
+ avahi-core/server.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/avahi-core/server.c b/avahi-core/server.c
+index e87f035..a2cb19a 100644
+--- a/avahi-core/server.c
++++ b/avahi-core/server.c
+@@ -587,7 +587,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
+ int unicast_response = 0;
+
+ if (!(key = avahi_dns_packet_consume_key(p, &unicast_response))) {
+- avahi_log_warn(__FILE__": Packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
++ avahi_log_debug(__FILE__": Packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
+ goto fail;
+ }
+
+@@ -615,7 +615,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
+ int unique = 0;
+
+ if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
+- avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
++ avahi_log_debug(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
+ goto fail;
+ }
+
+@@ -632,7 +632,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
+ int unique = 0;
+
+ if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
+- avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
++ avahi_log_debug(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
+ goto fail;
+ }
+
+@@ -669,7 +669,7 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter
+ int cache_flush = 0;
+
+ if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
+- avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
++ avahi_log_debug(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
+ break;
+ }
+
+@@ -901,13 +901,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+
+ if (!(i = avahi_interface_monitor_get_interface(s->monitor, iface, src_address->proto)) ||
+ !i->announcing) {
+- avahi_log_warn("Received packet from invalid interface.");
++ avahi_log_debug("Received packet from invalid interface.");
+ return;
+ }
+
+ if (port <= 0) {
+ /* This fixes RHBZ #475394 */
+- avahi_log_warn("Received packet from invalid source port %u.", (unsigned) port);
++ avahi_log_debug("Received packet from invalid source port %u.", (unsigned) port);
+ return;
+ }
+
+@@ -924,7 +924,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+ from_local_iface = originates_from_local_iface(s, iface, src_address, port);
+
+ if (avahi_dns_packet_check_valid_multicast(p) < 0) {
+- avahi_log_warn("Received invalid packet.");
++ avahi_log_debug("Received invalid packet.");
+ return;
+ }
+
+@@ -940,7 +940,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+
+ if ((avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) != 0 ||
+ avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0)) {
+- avahi_log_warn("Invalid legacy unicast query packet.");
++ avahi_log_debug("Invalid legacy unicast query packet.");
+ return;
+ }
+
+@@ -956,19 +956,19 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+ char t[AVAHI_ADDRESS_STR_MAX];
+
+ if (port != AVAHI_MDNS_PORT) {
+- avahi_log_warn("Received response from host %s with invalid source port %u on interface '%s.%i'", avahi_address_snprint(t, sizeof(t), src_address), port, i->hardware->name, i->protocol);
++ avahi_log_debug("Received response from host %s with invalid source port %u on interface '%s.%i'", avahi_address_snprint(t, sizeof(t), src_address), port, i->hardware->name, i->protocol);
+ return;
+ }
+
+ if (ttl != 255 && s->config.check_response_ttl) {
+- avahi_log_warn("Received response from host %s with invalid TTL %u on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), ttl, i->hardware->name, i->protocol);
++ avahi_log_debug("Received response from host %s with invalid TTL %u on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), ttl, i->hardware->name, i->protocol);
+ return;
+ }
+
+ if (!is_mdns_mcast_address(dst_address) &&
+ !avahi_interface_address_on_link(i, src_address)) {
+
+- avahi_log_warn("Received non-local response from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol);
++ avahi_log_debug("Received non-local response from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol);
+ return;
+ }
+
+@@ -976,7 +976,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
+ avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 ||
+ avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) {
+
+- avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
++ avahi_log_debug("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
+ return;
+ }
+
+@@ -992,12 +992,12 @@ static void dispatch_legacy_unicast_packet(AvahiServer *s, AvahiDnsPacket *p) {
+ assert(p);
+
+ if (avahi_dns_packet_check_valid(p) < 0 || avahi_dns_packet_is_query(p)) {
+- avahi_log_warn("Received invalid packet.");
++ avahi_log_debug("Received invalid packet.");
+ return;
+ }
+
+ if (!(slot = find_slot(s, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID)))) {
+- avahi_log_warn("Received legacy unicast response with unknown id");
++ avahi_log_debug("Received legacy unicast response with unknown id");
+ return;
+ }
+
+--
+2.6.4
+