summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link.h
Commit message (Collapse)AuthorAgeFilesLines
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-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.
* resolved: automatically forget all learnt DNS server information when the ↵Lennart Poettering2017-10-051-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.
* resolved: count the number of addresses per linkLennart Poettering2017-02-131-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.
* resolved: populate mDNS scopes' zones with RRs for the hostDmitry Rozhkov2017-01-191-0/+2
| | | | Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
* resolved: directly include some required headers instead of inheritingDavid Michael2016-08-311-0/+1
|
* resolved: make sure DNS configuration pushed in by the user stays around on ↵Lennart Poettering2016-06-211-2/+9
| | | | | | | restarts Let's make sure that all settings pushed in stay around when systemd-resolved is restarted.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* resolved: rework what ResolveHostname() with family == AF_UNSPEC meansLennart Poettering2016-02-011-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.
* resolved: when checking whether a link is relevant, check kernel operstateLennart Poettering2016-01-251-0/+1
| | | | This mimics what networkd is doing to detect a carrier.
* resolved: rework DNSSECSupported propertyLennart Poettering2016-01-191-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.
* resolved: add bus API for configuring per-link DNS settingsLennart Poettering2016-01-191-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.
* resolved: allocate DNS scope for links only if the interface is upLennart Poettering2016-01-191-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.
* resolved: introduce support for per-interface negative trust anchorsLennart Poettering2016-01-061-0/+1
|
* resolved,networkd: add a per-interface DNSSEC settingLennart Poettering2016-01-051-0/+1
| | | | | This adds a DNSSEC= setting to .network files, and makes resolved honour them.
* resolved,networkd: unify ResolveSupport enumLennart Poettering2016-01-051-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.
* resolved: create dns scopes for mDNSDaniel Mack2015-12-081-0/+2
| | | | Follow what LLMNR does, and create per-link DnsScope objects.
* resolved: add infrastructure for mDNS related socketsDaniel Mack2015-12-081-0/+1
| | | | | Just hook up mDNS listeners with an empty packet dispather function, introduce a config directive, man page updates etc.
* resolved: enforce a maximum limit on both dns servers and search domainsLennart Poettering2015-11-251-0/+5
|
* resolved: unify DnsServer handling code between Link and ManagerLennart Poettering2015-11-251-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.
* resolved: add a generic DnsSearchDomain conceptLennart Poettering2015-11-251-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.
* resolved: rework dns server lifecycle logicLennart Poettering2015-11-251-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.
* sd-netlink: rename from sd-rtnlTom Gundersen2015-06-131-2/+2
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-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.
* resolved: enforce ratelimit on LLMNR trafficLennart Poettering2014-08-051-3/+0
|
* resolved: read the per-interface LLMNR setting from networkd and act on itLennart Poettering2014-08-041-0/+2
|
* resolved: flush cache each time we change to a different DNS serverLennart Poettering2014-08-011-0/+2
|
* resolved: rename resolved.h to resolved-manager.hLennart Poettering2014-08-011-1/+1
| | | | | After all it pretty much exlcusively containers definitions about the "Manager" object, hence let's call this the most obvious way.
* resolved: implement LLMNR uniqueness verificationLennart Poettering2014-07-311-1/+2
|
* resolve: add llmnr responder side for UDP and TCPLennart Poettering2014-07-291-3/+7
| | | | Name defending is still missing.
* resolved: don't read DHCP leasesTom Gundersen2014-07-231-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.
* change type for address family to "int"Lennart Poettering2014-07-181-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.
* resolved: add LLMNR support for looking up namesLennart Poettering2014-07-181-5/+7
|
* resolved: properly handle MTU logicLennart Poettering2014-07-171-1/+1
|
* resolved: add a DNS client stub resolverLennart Poettering2014-07-161-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)