summaryrefslogtreecommitdiffstats
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:59 +0000
commita2848ee32e74d19ad0a81eeb92779183db825f15 (patch)
tree0e0fe17d6b4e8606c2fe89e6d4cca300185d8c1a /meta/recipes-connectivity
parent04ef34f3dbf99980baa6ec54621eabf11698a975 (diff)
downloadpoky-a2848ee32e74d19ad0a81eeb92779183db825f15.tar.gz
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 (From OE-Core rev: 72027dea342a6f3a9fe35f1a04ce59728e21863a) Signed-off-by: Brad Mouring <brad.mouring@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 \
27 file://out-of-tree.patch \ 27 file://out-of-tree.patch \
28 file://0001-avahi-fix-avahi-status-command-error-prompt.patch \ 28 file://0001-avahi-fix-avahi-status-command-error-prompt.patch \
29 file://reuseport-check.patch \ 29 file://reuseport-check.patch \
30 file://0001-Don-t-log-warnings-about-invalid-packets-Fixes-lathi.patch \
30 " 31 "
31 32
32USERADD_PACKAGES = "avahi-daemon avahi-autoipd" 33USERADD_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 @@
1From de7cde877e4daa5d9d4fb5b1a349299eaa94969d Mon Sep 17 00:00:00 2001
2From: Trent Lloyd <trent@lloyd.id.au>
3Date: Sat, 10 Oct 2015 06:20:46 +0800
4Subject: [PATCH] Don't log warnings about invalid packets (Fixes
5 lathiat/avahi#10)
6
7Various invalid packets would generate a warning, in particular
8Windows 10 generates response packets with no answer records and
9generally seemingly empty. Unsure why at this stage.
10
11This results in spamming syslog quite a lot on busy networks,
12similar issues like this have occured over time due to changes
13in various operating systems and specs (e.g. Avahi #284, #282)
14
15Rather than just disable this single message or case, I have
16pre-emptively turned the majority of these bad packet messages
17into debug messages. They can still be output on production
18builds if reuqired using the --debug option (no rebuild required).
19
20External References:
21https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1342400
22https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794145
23https://bugzilla.redhat.com/show_bug.cgi?id=1240711
24
25Pulled from git://github.com/lathiat/avahi de7cde87, which
26is slated for avahi 0.6.32.
27
28Signed-off-by: Brad Mouring <brad.mouring@ni.com>
29Upstream-Status: Backport
30
31---
32 avahi-core/server.c | 28 ++++++++++++++--------------
33 1 file changed, 14 insertions(+), 14 deletions(-)
34
35diff --git a/avahi-core/server.c b/avahi-core/server.c
36index e87f035..a2cb19a 100644
37--- a/avahi-core/server.c
38+++ b/avahi-core/server.c
39@@ -587,7 +587,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
40 int unicast_response = 0;
41
42 if (!(key = avahi_dns_packet_consume_key(p, &unicast_response))) {
43- avahi_log_warn(__FILE__": Packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
44+ avahi_log_debug(__FILE__": Packet too short or invalid while reading question key. (Maybe a UTF-8 problem?)");
45 goto fail;
46 }
47
48@@ -615,7 +615,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
49 int unique = 0;
50
51 if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
52- avahi_log_warn(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
53+ avahi_log_debug(__FILE__": Packet too short or invalid while reading known answer record. (Maybe a UTF-8 problem?)");
54 goto fail;
55 }
56
57@@ -632,7 +632,7 @@ static void handle_query_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInterfac
58 int unique = 0;
59
60 if (!(record = avahi_dns_packet_consume_record(p, &unique))) {
61- avahi_log_warn(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
62+ avahi_log_debug(__FILE__": Packet too short or invalid while reading probe record. (Maybe a UTF-8 problem?)");
63 goto fail;
64 }
65
66@@ -669,7 +669,7 @@ static void handle_response_packet(AvahiServer *s, AvahiDnsPacket *p, AvahiInter
67 int cache_flush = 0;
68
69 if (!(record = avahi_dns_packet_consume_record(p, &cache_flush))) {
70- avahi_log_warn(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
71+ avahi_log_debug(__FILE__": Packet too short or invalid while reading response record. (Maybe a UTF-8 problem?)");
72 break;
73 }
74
75@@ -901,13 +901,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
76
77 if (!(i = avahi_interface_monitor_get_interface(s->monitor, iface, src_address->proto)) ||
78 !i->announcing) {
79- avahi_log_warn("Received packet from invalid interface.");
80+ avahi_log_debug("Received packet from invalid interface.");
81 return;
82 }
83
84 if (port <= 0) {
85 /* This fixes RHBZ #475394 */
86- avahi_log_warn("Received packet from invalid source port %u.", (unsigned) port);
87+ avahi_log_debug("Received packet from invalid source port %u.", (unsigned) port);
88 return;
89 }
90
91@@ -924,7 +924,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
92 from_local_iface = originates_from_local_iface(s, iface, src_address, port);
93
94 if (avahi_dns_packet_check_valid_multicast(p) < 0) {
95- avahi_log_warn("Received invalid packet.");
96+ avahi_log_debug("Received invalid packet.");
97 return;
98 }
99
100@@ -940,7 +940,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
101
102 if ((avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) != 0 ||
103 avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0)) {
104- avahi_log_warn("Invalid legacy unicast query packet.");
105+ avahi_log_debug("Invalid legacy unicast query packet.");
106 return;
107 }
108
109@@ -956,19 +956,19 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
110 char t[AVAHI_ADDRESS_STR_MAX];
111
112 if (port != AVAHI_MDNS_PORT) {
113- 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);
114+ 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);
115 return;
116 }
117
118 if (ttl != 255 && s->config.check_response_ttl) {
119- 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);
120+ 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);
121 return;
122 }
123
124 if (!is_mdns_mcast_address(dst_address) &&
125 !avahi_interface_address_on_link(i, src_address)) {
126
127- 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);
128+ 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);
129 return;
130 }
131
132@@ -976,7 +976,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres
133 avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ANCOUNT) == 0 ||
134 avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_NSCOUNT) != 0) {
135
136- avahi_log_warn("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
137+ avahi_log_debug("Invalid response packet from host %s.", avahi_address_snprint(t, sizeof(t), src_address));
138 return;
139 }
140
141@@ -992,12 +992,12 @@ static void dispatch_legacy_unicast_packet(AvahiServer *s, AvahiDnsPacket *p) {
142 assert(p);
143
144 if (avahi_dns_packet_check_valid(p) < 0 || avahi_dns_packet_is_query(p)) {
145- avahi_log_warn("Received invalid packet.");
146+ avahi_log_debug("Received invalid packet.");
147 return;
148 }
149
150 if (!(slot = find_slot(s, avahi_dns_packet_get_field(p, AVAHI_DNS_FIELD_ID)))) {
151- avahi_log_warn("Received legacy unicast response with unknown id");
152+ avahi_log_debug("Received legacy unicast response with unknown id");
153 return;
154 }
155
156--
1572.6.4
158