Tcl Library Source Code

Artifact [5ba2d3d8b4]
Login

Artifact 5ba2d3d8b40f0c37e6581ff4f7b9b31ae668fa9460f9cebe7bf3973cea69ccae:

Attachment "0001-enable-mdns.patch" to ticket [294ebffb63] added by umlaeute 2022-05-25 14:07:51. (unpublished)
From 33d20fbb0f03532222279f97882bd5a657c7f313 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= <[email protected]>
Date: Wed, 25 May 2022 15:42:45 +0200
Subject: [PATCH] enable mdns

---
 modules/dns/dns.tcl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/dns/dns.tcl b/modules/dns/dns.tcl
index 316458bb2..29ab204ac 100644
--- a/modules/dns/dns.tcl
+++ b/modules/dns/dns.tcl
@@ -802,6 +802,11 @@ proc ::dns::UdpTransmit {token} {
     } else {
         # using tcludp
         set state(sock) [udp_open]
+        if { $state(-protocol) eq "mdns" } {
+            set state(-nameserver) "224.0.0.251"
+            set state(-port)       5353
+            fconfigure $state(sock) -mcastadd $state(-nameserver);
+        }
         udp_conf $state(sock) $state(-nameserver) $state(-port)
     }
     fconfigure $state(sock) -translation binary -buffering none
-- 
2.36.1