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

FS#3167 - umdns advertises link-local address instead of global address #8037

Closed
openwrt-bot opened this issue Jun 8, 2020 · 3 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

dwmw2:

I run 'ubus call umdns hosts' and all my OpenWRT APs show up with their Legacy IP address and a link-local IPv6 address, but without their global IPv6 address.

This means that dawn, for example, only gets the link-local IPv6 address of the hosts in _dawn._tcp, but it can't connect to that address since it doesn't know which interface to use.

@openwrt-bot
Copy link
Author

dwmw2:

This blocks berlin-open-wireless-lab/DAWN#95 AFAICT.

@openwrt-bot
Copy link
Author

dwmw2:

This appears to fix it. In the records we publish, we don't want the link-local addresses; we want the global ones.

--- a/dns.c +++ b/dns.c @@ -202,7 +202,7 @@ dns_reply_a(struct interface *iface, struct sockaddr *to, int ttl) if (ifa->ifa_addr->sa_family == AF_INET6) { uint8_t ll_prefix[] = {0xfe, 0x80 }; sa6 = (struct sockaddr_in6 *) ifa->ifa_addr; - if (!memcmp(&sa6->sin6_addr, &ll_prefix, 2)) + if (memcmp(&sa6->sin6_addr, &ll_prefix, 2)) dns_add_answer(TYPE_AAAA, (uint8_t *) &sa6->sin6_addr, 16, ttl); } }

@openwrt-bot
Copy link
Author

dwmw2:

Fixed by commit 68b94f0

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

No branches or pull requests

1 participant