From ab3fa69b8fb8ec2f8065d78f7fa1f7d819459172 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 28 Dec 2020 17:37:03 +0100 Subject: [PATCH] mdns: Fixed the ip header TTL to be correctly set to 255 Defined in https://tools.ietf.org/html/rfc6762#section-11: All Multicast DNS responses (including responses sent via unicast) SHOULD be sent with IP TTL set to 255 * Original commit: espressif/esp-idf@5cce919cbef87f543bb9f5275b77b97b3b1ea67e --- components/mdns/mdns_networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mdns/mdns_networking.c b/components/mdns/mdns_networking.c index 152ab2798..48d11918b 100644 --- a/components/mdns/mdns_networking.c +++ b/components/mdns/mdns_networking.c @@ -38,7 +38,7 @@ static esp_err_t _udp_pcb_main_init(void) _pcb_main = NULL; return ESP_ERR_INVALID_STATE; } - _pcb_main->mcast_ttl = 1; + _pcb_main->mcast_ttl = 255; _pcb_main->remote_port = MDNS_SERVICE_PORT; ip_addr_copy(_pcb_main->remote_ip, *(IP_ANY_TYPE)); udp_recv(_pcb_main, &_udp_recv, _mdns_server);