Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to specify hostname causes the whole service to be lost #17

Open
adelton opened this issue Jan 17, 2025 · 2 comments
Open

Attempt to specify hostname causes the whole service to be lost #17

adelton opened this issue Jan 17, 2025 · 2 comments

Comments

@adelton
Copy link

adelton commented Jan 17, 2025

I try to configure a service in /etc/umdns/printer.json:

{
  "samsung-ipp": {
    "service": "_ipp._tcp.local",
    "instance": "Samsung @ host",
    "port": 631,
    "txt": [
      "pdl=application/pdf,application/postscript,image/jpeg,image/png,image/pwg-raster,image/urf"
    ]
  }
}

I debug by running avahi-browse _ipp._tcp on another machine in the network and I see my service shown.

Looking at 3b341f4 it should be possible to also specify a hostname in the JSON which would be great -- I would be able to statically define the service on my OpenWrt device even for other machines. However, when I add the hostname attribute and

/etc/init.d/umdns restart

suddenly avahi-browse shows removal of the service altogether.

@adelton
Copy link
Author

adelton commented Jan 17, 2025

I believe the problem is cause by a premature return at

mdnsd/service.c

Line 256 in 93458ac

return;

When if (_tb[SERVICE_HOSTNAME]) { sees that hostname attribute / field, shouldn't the code service_load_hostname() and continue with setting up the service data structure?

@adelton
Copy link
Author

adelton commented Jan 17, 2025

For the record, I'm testing this with umdns - 2024.09.17~fbaca4b6-r1 on OpenWrt 24.10.0-rc5 (r28304-6dacba30a7).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant