summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.h
AgeCommit message (Collapse)AuthorFilesLines
2019-04-13resolve: rename Link.name -> Link.ifnameYu Watanabe1-3/+1
This also changes the type from char[IF_NAMESIZE] to char*. By changing the type, now resolved-link.h can drop the dependency to the header net/if.h.
2018-12-21resolved: add an explicit way to configure whether a link is useful as ↵Lennart Poettering1-0/+2
default route Previously, we'd use a link as "default" route depending on whether there are route-only domains defined on it or not. (If there are, it would not be used as default route, if there aren't it would.) Let's make this explicit and add a link variable controlling this. The variable is not changeable from the outside yet, but subsequent commits are supposed to add that. Note that making this configurable adds a certain amount of redundancy, as there are now two ways to ensure a link does not receive "default" lookup (i.e. DNS queries matching no configured route): 1. By ensuring that at least one other link configures a route on it (for example by add "." to its search list) 2. By setting this new boolean to false. But this is exactly what is intended with this patch: that there is an explicit way to configure on the link itself whether it receives 'default' traffic, rather than require this to be configured on other links. The variable added is a tri-state: if true, the link is suitable for recieving "default" traffic. If false, the link is not suitable for it. If unset (i.e. negative) the original logic of "has this route-only routes" is used, to ensure compatibility with the status quo ante.
2018-12-17resolve: bump max of dns servers/search domainsLennart Poettering1-2/+2
Apparently people want more of these (as #11175 shows). Since this is merely a safety limit for us, let's just bump all values substantially. Fixes: #11175
2018-06-14tree-wide: remove Lennart's copyright linesLennart Poettering1-4/+0
These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
2018-06-14tree-wide: drop 'This file is part of systemd' blurbLennart Poettering1-2/+0
This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
2018-06-14resolve: rename PrivateDNS to DNSOverTLSIwan Timmer1-3/+3
PrivateDNS is not considered a good name for this option, so rename it to DNSOverTLS
2018-06-11resolve: make PrivateDNS configurable per linkIwan Timmer1-0/+4
Like with DNSSec, make PrivateDNS configurable per link, so you can have trusted and untrusted links.
2018-04-06tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek1-13/+0
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
2017-11-19Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek1-0/+1
This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
2017-10-05resolved: automatically forget all learnt DNS server information when the ↵Lennart Poettering1-0/+2
network configuration changes When the network configuration changes we should relearn everything there is to know about the configured DNS servers, because we might talk to the same addresses, but there might be different servers behind them.
2017-02-13resolved: count the number of addresses per linkLennart Poettering1-0/+1
This becomes handy later on. Moreover, we keep track of similar counters for other objects like this too, hence adding this here too is obvious.
2017-01-19resolved: populate mDNS scopes' zones with RRs for the hostDmitry Rozhkov1-0/+2
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
2016-08-31resolved: directly include some required headers instead of inheritingDavid Michael1-0/+1
2016-06-21resolved: make sure DNS configuration pushed in by the user stays around on ↵Lennart Poettering1-2/+9
restarts Let's make sure that all settings pushed in stay around when systemd-resolved is restarted.
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack1-2/+0
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-02-01resolved: rework what ResolveHostname() with family == AF_UNSPEC meansLennart Poettering1-2/+2
Previously, if a hostanem is resolved with AF_UNSPEC specified, this would be used as indication to resolve both an AF_INET and an AF_INET6 address. With this change this logic is altered: an AF_INET address is only resolved if there's actually a routable IPv4 address on the specific interface, and similar an AF_INET6 address is only resolved if there's a routable IPv6 address. With this in place, it's ensured that the returned data is actually connectable by applications. This logic mimics glibc's resolver behaviour. Note that if the client asks explicitly for AF_INET or AF_INET6 it will get what it asked for. This also simplifies the logic how it is determined whether a specific lookup shall take place on a scope. Specifically, the checks with dns_scope_good_key() are now moved out of the transaction code and into the query code, so that we don't even create a transaction object on a specific scope if we cannot execute the resolution on it anyway.
2016-01-25resolved: when checking whether a link is relevant, check kernel operstateLennart Poettering1-0/+1
This mimics what networkd is doing to detect a carrier.
2016-01-19resolved: rework DNSSECSupported propertyLennart Poettering1-0/+3
Not only report whether the server actually supports DNSSEC, but also first check whether DNSSEC is actually enabled for it in our local configuration. Also, export a per-link DNSSECSupported property in addition to the existing manager-wide property.
2016-01-19resolved: add bus API for configuring per-link DNS settingsLennart Poettering1-0/+6
This is useful for alternative network management solutions (such as NetworkManager) to push DNS configuration data into resolved. The calls will fail should networkd already have taken possesion of a link, so that the bus API is only available if we don't get the data from networkd.
2016-01-19resolved: allocate DNS scope for links only if the interface is upLennart Poettering1-1/+1
For mDNS and LLMNR we already created the scopes only if the specific interfaces where actually up and suitable for Multicasting. Add a similar (but weaker) logic for unicast DNS as well.
2016-01-06resolved: introduce support for per-interface negative trust anchorsLennart Poettering1-0/+1
2016-01-05resolved,networkd: add a per-interface DNSSEC settingLennart Poettering1-0/+1
This adds a DNSSEC= setting to .network files, and makes resolved honour them.
2016-01-05resolved,networkd: unify ResolveSupport enumLennart Poettering1-2/+3
networkd previously knew an enum "ResolveSupport" for configuring per-interface LLMNR support, resolved had a similar enum just called "Support", with the same value and similar pasers. Unify this, call the enum ResolveSupport, and port both daemons to it.
2015-12-08resolved: create dns scopes for mDNSDaniel Mack1-0/+2
Follow what LLMNR does, and create per-link DnsScope objects.
2015-12-08resolved: add infrastructure for mDNS related socketsDaniel Mack1-0/+1
Just hook up mDNS listeners with an empty packet dispather function, introduce a config directive, man page updates etc.
2015-11-25resolved: enforce a maximum limit on both dns servers and search domainsLennart Poettering1-0/+5
2015-11-25resolved: unify DnsServer handling code between Link and ManagerLennart Poettering1-7/+0
This copies concepts we introduced for the DnsSearchDomain stuff, and reworks the operations on lists of dns servers to be reusable and generic for use both with the Link and the Manager object.
2015-11-25resolved: add a generic DnsSearchDomain conceptLennart Poettering1-0/+6
With this change, we add a new object to resolved, "DnsSearchDomain=" which wraps a search domain. This is then used to introduce a global search domain list, in addition to the existing per-link search domain list which is reword to make use of this new object too. This is preparation for implement proper unicast DNS search domain support.
2015-11-25resolved: rework dns server lifecycle logicLennart Poettering1-0/+4
Previously, there was a chance of memory corruption, because when switching to the next DNS server we didn't care whether they linked list of DNS servers was still valid. Clean up lifecycle of the dns server logic: - When a DnsServer object is still in the linked list of DnsServers for a link or the manager, indicate so with a "linked" boolean field, and never follow the linked list if that boolean is not set. - When picking a DnsServer to use for a link ot manager, always explicitly take a reference. This also rearranges some logic, to make the tracking of dns servers by link and globally more alike.
2015-06-13sd-netlink: rename from sd-rtnlTom Gundersen1-2/+2
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen1-2/+0
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2014-08-05resolved: enforce ratelimit on LLMNR trafficLennart Poettering1-3/+0
2014-08-04resolved: read the per-interface LLMNR setting from networkd and act on itLennart Poettering1-0/+2
2014-08-01resolved: flush cache each time we change to a different DNS serverLennart Poettering1-0/+2
2014-08-01resolved: rename resolved.h to resolved-manager.hLennart Poettering1-1/+1
After all it pretty much exlcusively containers definitions about the "Manager" object, hence let's call this the most obvious way.
2014-07-31resolved: implement LLMNR uniqueness verificationLennart Poettering1-1/+2
2014-07-29resolve: add llmnr responder side for UDP and TCPLennart Poettering1-3/+7
Name defending is still missing.
2014-07-23resolved: don't read DHCP leasesTom Gundersen1-3/+2
networkd will expose both statically configured DNS servers and servers receieved over DHCP in sd_network_get_dns(), so no need to keep the distinction in resolved.
2014-07-18change type for address family to "int"Lennart Poettering1-5/+5
Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
2014-07-18resolved: add LLMNR support for looking up namesLennart Poettering1-5/+7
2014-07-17resolved: properly handle MTU logicLennart Poettering1-1/+1
2014-07-16resolved: add a DNS client stub resolverLennart Poettering1-0/+84
Let's turn resolved into a something truly useful: a fully asynchronous DNS stub resolver that subscribes to network changes. (More to come: caching, LLMNR, mDNS/DNS-SD, DNSSEC, IDN, NSS module)