mDNS: ignore responses with src port != 5353 (rfc6762 section 6)

This commit is contained in:
Jasper Verschueren 2018-10-19 16:09:07 +02:00 committed by Dirk Ziegelmeier
parent 16da67bb21
commit 65eb36b10d

View File

@ -1083,6 +1083,12 @@ mdns_handle_response(struct mdns_packet *pkt, struct netif *netif)
{
struct mdns_host* mdns = NETIF_TO_HOST(netif);
/* Ignore responses with a source port different from 5353
* (LWIP_IANA_PORT_MDNS) -> RFC6762 section 6 */
if (pkt->source_port != LWIP_IANA_PORT_MDNS) {
return;
}
/* Ignore all questions */
while (pkt->questions_left) {
struct mdns_question q;