Skip to content

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

@fzs

Description

@fzs

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions