openwrt/package
Christian Marangi 2541ff391f
procd: make mDNS TXT record parsing more solid
mDNS broadcast can't accept empty TXT record and would fail
registration.

Current procd_add_mdns_service checks only if the first passed arg is
empty but don't make any verification on the other args permittins
insertion of empty values in TXT record.

Example:

	procd_add_mdns "blah" \
				"tcp" "50" \
				"1" \
				"" \
				"3"

Produce:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }

The middle empty TXT record should never be included as it's empty.

This can happen with scripts that make fragile parsing and include
variables even if they are empty.

Prevent this and make the TXT record more solid by checking every
provided TXT record and include only the non-empty ones.

The fixed JSON is the following:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }

Fixes: b0d9dcf84d ("procd: update to latest git HEAD")
Reported-by: Paul Donald <newtwen@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15331
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 4b04304713)
2024-04-29 23:30:04 +02:00
..
base-files OpenWrt v23.05.3: revert to branch defaults 2024-03-22 23:26:12 +01:00
boot Revert "uboot-mediatek: fix build on Mac OS X" 2024-04-27 06:53:23 +00:00
devel perf: opt-out of lto usage 2023-08-11 12:53:34 +02:00
firmware firmware: intel-microcode: update to 20240312 2024-03-16 00:42:38 +01:00
kernel mac80211: backport ieee80211_set_sband_iftype_data() 2024-04-26 11:37:07 +02:00
libs openssl: update to 3.0.13 2024-02-04 19:18:17 +01:00
network netifd: packet-steering: silence error on applying queue mask 2024-04-18 12:43:06 +02:00
system procd: make mDNS TXT record parsing more solid 2024-04-29 23:30:04 +02:00
utils ucode: add libjson-c/host dependency 2024-02-04 19:18:17 +01:00
Makefile build: do not depend on $(STAGING_DIR)/.prepared when in SDK 2024-03-04 23:59:24 +01:00