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

Conditionally adding A records in conf.c is a rather fragile approach #1

Open
fzs opened this issue Sep 28, 2022 · 0 comments
Open

Comments

@fzs
Copy link
Member

fzs commented Sep 28, 2022

Right now A records are only added when the interface already has an IP address. This works, because the whole configuration is reloaded when something changes, but it is rather fragile. It would be preferable if A/AAAA records were added dynamically when the interface IP changes. This is currently not implemented in the library because it needs external information like the conflict callback and hostname. Maybe a better solution can be found.

mdnsd/src/conf.c

Lines 209 to 214 in 855ca69

/* If an IPv4 address is already set, add an A record for it. */
struct in_addr ipv4addr = mdnsd_get_address(d);
if (ipv4addr.s_addr != 0) {
r = record(iface, 0, NULL, nlocal, QTYPE_A, 120);
mdnsd_set_ip(d, r, ipv4addr);
}

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