On Thu, 14.08.14 02:21, Lennart Poettering ([email protected]) wrote: > On Mon, 04.08.14 10:05, Michael Marineau ([email protected]) wrote: > > Patch looks pretty good, though I'd really prefer if we could do the > UseDomain= thing as discussed in the other mail, and not propagate > DHCP-supplied domain names unless explicitly requested. > > This would means we probably mean we'd need two new sd-network.h calls: > > int sd_network_get_link_route_domains(int ifindex, char **domains); > int sd_network_get_link_search_domains(int ifindex, char **domains); > > The former would return the list of domains whose requests shall be > routed to the specified interface, and the latter would be the list of > domains we actively use for searching single-label domains in. > > Any domains configured statically for a link in the .network files would > be listed in both lists. And depending on the UseDomains= settings the > dhcp provides domains might be listed on none, both or only one of > them. or something like that...
So, I have thought about this a bit more over night... I think this would still be too complicated, and I don't really see the need to make the dhcp search thing that configurable. I see no risk in strictly making single-label host names searchable in all configured domains of the interface and nothing else... I think I am back at suggesting that there should be the follow .network settings: [Network] Domains=0pointer.de redhat.com [DHCP] UseDomains=yes|no And one sd-network function: int sd_network_get_link_domains(int ifindex, char **domains); And that should be it. UseDomain= should have the effect of adding the domains from dhcp option 15 and 119 to the list of domains for the interface. And sd_network_get_link_domains() should then return a single list, of deduplicated entries, with the domains specified in Domains= first, and then the dhcp domains possible added in at the end. Zbigniew, I think this simplification would be beneficial, as I really don't see the need to make the search vs. route domain thing configurable.... Tom, what's your take on all of this? The domain data from DHCP should be thoroughly verified btw. For example, if is_hostname() is true for some domain acquired via DHCP we should ignore it, and we should make sure that the domain name is actually valid, and so on. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
