Diff

mod_dnsupdate/mod_dnsupdate.lua @ 5711:429be658c0bb

mod_dnsupdate: Support advertising explicit non-existence of service
author Kim Alvefur <zash@zash.se>
date Fri, 03 Nov 2023 23:26:57 +0100
parent 4896:54fa2116bbf3
line wrap: on
line diff
--- a/mod_dnsupdate/mod_dnsupdate.lua	Thu Nov 02 17:00:53 2023 +0000
+++ b/mod_dnsupdate/mod_dnsupdate.lua	Fri Nov 03 23:26:57 2023 +0100
@@ -121,6 +121,7 @@
 		if not opts.remove then
 			for port in ports do print(("add _%s._tcp.%s IN SRV 1 1 %d %s"):format(service, ihost, port, target)); end
 		end
+		if ports:empty() then print(("add _%s._tcp.%s IN SRV 0 0 0 ."):format(service, ihost)); end
 	end
 
 	print("show");