[OpenWrt-Devel] umdns vs avahi: differences in browse (missing ip addresses)

Karl Palsson karlp at tweak.net.au
Wed Nov 28 10:08:32 EST 2018


Hi,

I've been using umdns to advertise some services for a little
while, and when browsing from my desk, with avahi-browse, it has
worked well. I've finally gotten around to using "ubus umdns
browse" and have found some inconsistences/differences/quirks.
Any insights appreciated.

Two hosts on the local network, 

192.168.1.123 eg-03A19D is broadcasting using avahi-daemon and a
service file [1] 192.168.1.194 eg-037BCC is broadcasting using
umdns using "procd_add_mdns rme-sg tcp 22 "info=eTactica gateway
locator""

avahi-browse shows both services ~same. Both have a hostname,
both have a similar txt record, both have the correct IP address
shown.

$ avahi-browse -r _rme-sg._tcp

= enp0s25 IPv4 eTactica gateway Locator on eg-03A19D         _rme-sg._tcp         local
   hostname = [eg-03A19D.local]
   address = [192.168.1.123]
   port = [22]
   txt = ["info=This record is used to help find a gateway when using DHCP."]
= enp0s25 IPv4 eg-037BCC                                     _rme-sg._tcp         local
   hostname = [eg-037BCC.local]
   address = [192.168.1.194]
   port = [22]
   txt = ["info=eTactica gateway locator"]


But "ubus call umdns browse" is a different matter. The ipv4/v6
addresses are missing.

[other keys snipped]
	"_rme-sg._tcp": {
		"eg-037BCC": {
			"ipv4": "192.168.1.194",
			"ipv6": "fe80::c693:ff:fe03:7bcc",
			"port": 22,
			"txt": "info=eTactica gateway locator"
		},
		"eTactica gateway Locator on eg-03A19D": {
			"txt": "info=This record is used to help find a gateway when using DHCP."
		}



"ubus call fetch" returns more information, but it's clearly
missing the host information for the "failing" one.
$ ubus call umdns fetch '{"question": "_rme-sg._tcp.local", "interface": "eth0"}'

		{
			"name": "_rme-sg._tcp.local",
			"type": "PTR",
			"ttl": 4375,
			"target": "eg-037BCC._rme-sg._tcp.local"
		},
		{
			"name": "eg-037BCC._rme-sg._tcp.local",
			"type": "SRV",
			"ttl": 4375,
			"priority": 2405,
			"weight": 26413,
			"port": 22,
			"target": "eg-037BCC.local"
		},
		{
			"name": "eg-037BCC.local",
			"type": "A",
			"ttl": 4039,
			"target": "192.168.1.194"
		},
		{
			"name": "eg-037BCC.local",
			"type": "AAAA",
			"ttl": 4039,
			"target": "fe80::c693:ff:fe03:7bcc"
		},
		{
			"name": "eg-037BCC._rme-sg._tcp.local",
			"type": "TXT",
			"ttl": 4375,
			"data": [
				"info=eTactica gateway locator"
			]
		},

		{
			"name": "_rme-sg._tcp.local",
			"type": "PTR",
			"ttl": 4375,
			"target": "eTactica gateway Locator on eg-03A19D._rme-sg._tcp.local"
		},
		{
			"name": "eTactica gateway Locator on eg-03A19D._rme-sg._tcp.local",
			"type": "TXT",
			"ttl": 4375,
			"data": [
				"info=This record is used to help find a gateway when using DHCP."
			]
		}


Is this a bug in umdns? is this a problem with the avahi
advertisements?

Sincerely,
Karl Palsson



[1] Avahi service conf file.
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">eTactica gateway Locator on %h</name>
  <service>
   <type>_rme-sg._tcp</type>
   <port>22</port>
   <txt-record>info=This record is used to help find a gateway when using DHCP.</txt-record>
  </service>
</service-group>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.html
Type: application/pgp-signature
Size: 1161 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181128/dcba172f/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list