changeset 5688: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
parents 4c84cfb586c1
children 09233b625cb9
files mod_dnsupdate/mod_dnsupdate.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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");