b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
658f7f026e85734ebbaf72dbf83df61d62b87460 |
|
04-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly turn off DNSSEC for LLMNR/mDNS scopes |
011696f76233486bc56c266b18a328924f70269c |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework what ResolveHostname() with family == AF_UNSPEC means
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. |
edbcc1fdd94355c5cf22263ba2c1cfa4ec2eb010 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolve: generate a nice clean error when clients try to resolve a name when the network is down |
c69fa7e3c44240bedc0ee1bd89fecf954783ac85 |
|
19-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework DNSSECSupported property
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. |
aa4a9deb7d3db95ffb1fd18791be66f58d06a69e |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: set a description on all our event sources |
ad6c04756115809d615dede330213d73edf732a8 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved,networkd: add a per-interface DNSSEC setting
This adds a DNSSEC= setting to .network files, and makes resolved honour
them. |
519ef04651b07a547f010d6462603669d7fde4e5 |
|
27-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework OPT RR generation logic
This moves management of the OPT RR out of the scope management and into
the server and packet management. There are now explicit calls for
appending and truncating the OPT RR from a packet
(dns_packet_append_opt() and dns_packet_truncate_opt()) as well as a
call to do the right thing depending on a DnsServer's feature level
(dns_server_adjust_opt()).
This also unifies the code to pick a server between the TCP and UDP code
paths, and makes sure the feature level used for the transaction is
selected at the time the server is picked, and not changed until the
next time we pick a server. The server selction code is now unified in
dns_transaction_pick_server().
This all fixes problems when changing between UDP and TCP communication
for the same server, and makes sure the UDP and TCP codepaths are more
alike. It also makes sure we never keep the UDP port open when switchung
to TCP, so that we don't have to handle incoming datagrams on the latter
we don't expect.
As the new code picks the DNS server at the time we make a connection,
we don't need to invalidate the DNS server anymore when changing to the
next one, thus dns_transaction_next_dns_server() has been removed. |
49cce12d4a07a77c6321b743e538c648d33c037c |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: name TCP and UDP socket calls uniformly
Previously the calls for emitting DNS UDP packets were just called
dns_{transacion|scope}_emit(), but the one to establish a DNS TCP
connection was called dns_transaction_open_tcp(). Clean this up, and
rename them dns_{transaction|scope}_emit_udp() and
dns_transaction_open_tcp(). |
0e4fb6b2dedf590741220b806c92e9e68857b457 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: no need to store return value of dns_server_possible_features()
The call already updates possible_features, it's pointless doing this in
the caller a second time. |
3bbdc31df37a23b5134a115c01d15e7ff870b3cc |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rename DNS_TRANSACTION_FAILURE → DNS_TRANSACTION_RCODE_FAILURE
We have many types of failure for a transaction, and
DNS_TRANSACTION_FAILURE was just one specific one of them, if the server
responded with a non-zero RCODE. Hence let's rename this, to indicate
which kind of failure this actually refers to. |
f4e380379a34d27c9950cb8c91548a798eafe9f3 |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when destroying a scope, only abort live transactions |
e5abebabb32b46c865f8a6f7a534795e1b72b757 |
|
14-Dec-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix typos and indentation |
fe2dfc8b4947451f87fcae56f839ca84dde26453 |
|
10-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: make sure the packet's transaction ID is always 0 for mDNS
RFC6762, 18.1:
In multicast query messages, the Query Identifier SHOULD be set to
zero on transmission. |
7bcffc2efa266823d9c2da1d8536e7f9c6e70a32 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: honour RFC6761's ban on the invalid TLD |
261f3673c197ff7e52722c212ae63baf853b6896 |
|
10-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: add more linked packets for overlong known answers
For mDNS, if we're unable to stuff all known answers into the given packet,
allocate a new one, push the RR into that one and link it to the current
one. |
80a62095dc5af36d9f46de693f3a84835bc28e96 |
|
10-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: handle linked packet in dns_scope_emit()
In dns_scope_emit(), walk the list of additional packets and emit all of
them. Set the TC bit in all but the last of them.
This is specific to mDNS, so an assertion is triggered if used with other
protocols. |
b43d96b0764e63088429f746cd9e515f55286460 |
|
09-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: don't send .local requests to DNS servers
DNS names ending with .local are specific to mDNS, so don't use them
on DNS scopes. |
b4f1862df2e45aba90386887d685b8bf3c840e10 |
|
08-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: create dns scopes for mDNS
Follow what LLMNR does, and create per-link DnsScope objects. |
0db4c90afd7d9c7c8884bf8b3ec459edc74a03da |
|
08-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: add code to join/leave mDNS multicast groups
Per link, join the mDNS multicast groups when the scope is created, and
leave it again when the scope goes away. |
931851e8e492a4d2715e22dcde50a5e7ccef4b49 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a concept of "authenticated" responses
This adds a new SD_RESOLVED_AUTHENTICATED flag for responses we return
on the bus. When set, then the data has been authenticated. For now this
mostly reflects the DNSSEC AD bit, if DNSSEC=trust is set. As soon as
the client-side validation is complete it will be hooked up to this flag
too.
We also set this bit whenver we generated the data ourselves, for
example, because it originates in our local LLMNR zone, or from the
built-in trust anchor database.
The "systemd-resolve-host" tool has been updated to show the flag state
for the data it shows. |
28b9b7640603f88cb49f95609331fa5072715f15 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework how we allow allow queries to be dispatched to scopes
Previously, we'd never do any single-label or root domain lookups via
DNS, thus leaving single-label lookups to LLMNR and the search path
logic in order that single-label names don't leak too easily onto the
internet. With this change we open things up a bit, and only prohibit
A/AAAA lookups of single-label/root domains, but allow all other
lookups. This should provide similar protection, but allow us to resolve
DNSKEY+DS RRs for the top-level and root domains.
(This also simplifies handling of the search domain detection, and gets
rid of dns_scope_has_search_domains() in favour of
dns_scope_get_search_domains()). |
c9ad0edbab44123ad14767232c2d5a2c5641b459 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: refuse resolving of a number of domains listed in RFC6303
We already blacklisted a few domains, add more. |
a8812dd7f161a3e459c1730ac92ff2bbc9986ff1 |
|
02-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add code to generate the wire format for a single RR
This adds dns_resource_record_to_wire_format() that generates the raw
wire-format of a single DnsResourceRecord object, and caches it in the
object, optionally in DNSSEC canonical form. This call is used later to
generate the RR serialization of RRs to verify.
This adds four new fields to DnsResourceRecord objects:
- wire_format points to the buffer with the wire-format version of the
RR
- wire_format_size stores the size of that buffer
- wire_format_rdata_offset specifies the index into the buffer where the
RDATA of the RR begins (i.e. the size of the key part of the RR).
- wire_format_canonical is a boolean that stores whether the cached wire
format is in DNSSEC canonical form or not.
Note that this patch adds a mode where a DnsPacket is allocated on the
stack (instead of on the heap), so that it is cheaper to reuse the
DnsPacket object for generating this wire format. After all we reuse the
DnsPacket object for this, since it comes with all the dynamic memory
management, and serialization calls we need anyway. |
d74fb368b18f0fbd9a4fe6f15691bbea7f3c4a01 |
|
27-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: announce support for large UDP packets
This is often needed for proper DNSSEC support, and even to handle AAAA records
without falling back to TCP.
If the path between the client and server is fully compliant, this should always
work, however, that is not the case, and overlarge packets will get mysteriously
lost in some cases.
For that reason, we use a similar fallback mechanism as we do for palin EDNS0,
EDNS0+DO, etc.:
The large UDP size feature is different from the other supported feature, as we
cannot simply verify that it works based on receiving a reply (as the server
will usually send us much smaller packets than what we claim to support, so
simply receiving a reply does not mean much).
For that reason, we keep track of the largest UDP packet we ever received, as this
is the smallest known good size (defaulting to the standard 512 bytes). If
announcing the default large size of 4096 fails (in the same way as the other
features), we fall back to the known good size. The same logic of retrying after a
grace-period applies. |
7586f4d172dd9c3ccc3126fc47dca9e49adec132 |
|
27-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: set the DNSSEC OK (DO) flag
This indicates that we can handle DNSSEC records (per RFC3225), even if
all we do is silently drop them. This feature requires EDNS0 support.
As we do not yet support larger UDP packets, this feature increases the
risk of getting truncated packets.
Similarly to how we fall back to plain UDP if EDNS0 fails, we will fall
back to plain EDNS0 if EDNS0+DO fails (with the same logic of remembering
success and retrying after a grace period after failure). |
9c5e12a4314e7192e834e1b855e5e80111e636a6 |
|
27-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: implement minimal EDNS0 support
This is a minimal implementation of RFC6891. Only default values
are used, so in reality this will be a noop.
EDNS0 support is dependent on the current server's feature level,
so appending the OPT pseudo RR is done when the packet is emitted,
rather than when it is assembled. To handle different feature
levels on retransmission, we strip off the OPT RR again after
sending the packet.
Similarly, to how we fall back to TCP if UDP fails, we fall back
to plain UDP if EDNS0 fails (but if EDNS0 ever succeeded we never
fall back again, and after a timeout we will retry EDNS0). |
be808ea083fa07271116b4519c3c27fd20c5f077 |
|
27-Nov-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: fallback to TCP if UDP fails
This is inspired by the logic in BIND [0], follow-up patches
will implement the reset of that scheme.
If we get a server error back, or if after several attempts we don't
get a reply at all, we switch from UDP to TCP for the given
server for the current and all subsequent requests. However, if
we ever successfully received a reply over UDP, we never fall
back to TCP, and once a grace-period has passed, we try to upgrade
again to using UDP. The grace-period starts off at five minutes
after the current feature level was verified and then grows
exponentially to six hours. This is to mitigate problems due
to temporary lack of network connectivity, but at the same time
avoid flooding the network with retries when the feature attempted
feature level genuinely does not work.
Note that UDP is likely much more commonly supported than TCP,
but depending on the path between the client and the server, we
may have more luck with TCP in case something is wrong. We really
do prefer UDP though, as that is much more lightweight, that is
why TCP is only the last resort.
[0]: <https://kb.isc.org/article/AA-01219/0/Refinements-to-EDNS-fallback-behavior-can-cause-different-outcomes-in-Recursive-Servers.html> |
f9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3 |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: handle properly if there are multiple transactions for the same key per scope
When the zone probing code looks for a transaction to reuse it will
refuse to look at transactions that have been answered from cache or the
zone itself, but insist on the network. This has the effect that there
might be multiple transactions around for the same key on the same
scope. Previously we'd track all transactions in a hashmap, indexed by
the key, which implied that there would be only one transaction per key,
per scope. With this change the hashmap will only store the most recent
transaction per key, and a linked list will be used to track all
transactions per scope, allowing multiple per-key per-scope.
Note that the linked list fields for this actually already existed in
the DnsTransaction structure, but were previously unused. |
c3bc53e62459d7e566ffffeade41cd82bc6754f5 |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: for a transaction, keep track where the answer data came from
Let's track where the data came from: from the network, the cache or the
local zone. This is not only useful for debugging purposes, but is also
useful when the zone probing wants to ensure it's not reusing
transactions that were answered from the cache or the zone itself. |
dc477e7385e8ab29efb8fadb72ec994077a105c6 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
dns-domain: simplify dns_name_is_root() and dns_name_is_single_label()
Let's change the return value to bool. If we encounter an error while
parsing, return "false" instead of the actual parsing error, after all
the specified hostname does not qualify for what the function is
supposed to test.
Dealing with the additional error codes was always cumbersome, and
easily misused, like for example in the DHCP code.
Let's also rename the functions from dns_name_root() to
dns_name_is_root(), to indicate that this function checks something and
returns a bool. Similar for dns_name_is_signal_label(). |
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47dd |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fully support DNS search domains
This adds support for searching single-label hostnames in a set of
configured search domains.
A new object DnsQueryCandidate is added that links queries to scopes.
It keeps track of the search domain last used for a query on a specific
link. Whenever a host name was unsuccessfuly resolved on a scope all its
transactions are flushed out and replaced by a new set, with the next
search domain appended.
This also adds a new flag SD_RESOLVED_NO_SEARCH to disable search domain
behaviour. The "systemd-resolve-host" tool is updated to make this
configurable via --search=.
Fixes #1697 |
a51c10485af349eb15faa4d1a63b9818bcf3e589 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a generic DnsSearchDomain concept
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. |
84129d46cd6e95e142973da93aede4c7433c9600 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: indent less, by exiting earlier |
5032b16dfe395112d72798581664992429f90d17 |
|
18-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: simplify dns zone logic: take a single key when looking up entries
Instead of taking a DnsQuestion object (i.e. an array of keys) only take
a single key. This simplifies things a bit, and as DNS/LLMNR require a
single question per query message was unnecessary anyway.
This mimics a similar change that was done a while ago for the dns cache
logic. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
4d506d6bb757af3b99e0876234c465e6898c5ea4 |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: dump cache and zone contents to syslog on SIGUSR1 |
d8b7e75f517dad8c1a2dfdf3c82dd6ee9e992391 |
|
25-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
resolve: fix regression in dns-scope
Bring back a return statement 106784eb errornously removed.
Thanks to @phomes for reporting. |
106784ebb7b303ae471851100a773ad2aebf5b80 |
|
25-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: use switch-case statements for protocol details
With more protocols to come, switch repetitive if-else blocks with a
switch-case statements. |
da0c630e141e3c3fab633a1c7a0686295e2c9411 |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: replace transaction list by hashmap
Right now we keep track of ongoing transactions in a linked listed for
each scope. Replace this by a hashmap that is indexed by the RR key.
Given that all ongoing transactions will be placed in pretty much the
same scopes usually this should optimize behaviour.
We used to require a list here, since we wanted to do "superset" query
checks, but this became obsolete since transactions are now single-key
instead of multi-key. |
f52e61da047d7fc74e83f12dbbf87e0cbcc51c73 |
|
21-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: only maintain one question RR key per transaction
Let's simplify things and only maintain a single RR key per transaction
object, instead of a full DnsQuestion. Unicast DNS and LLMNR don't
support multiple questions per packet anway, and Multicast DNS suggests
coalescing questions beyond a single dns query, across the whole system. |
78c6a153c47f8d597c827bdcaf8c4e42ac87f738 |
|
21-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework synthesizing logic
With this change we'll now also generate synthesized RRs for the local
LLMNR hostname (first label of system hostname), the local mDNS hostname
(first label of system hostname suffixed with .local), the "gateway"
hostname and all the reverse PTRs. This hence takes over part of what
nss-myhostname already implemented.
Local hostnames resolve to the set of local IP addresses. Since the
addresses are possibly on different interfaces it is necessary to change
the internal DnsAnswer object to track per-RR interface indexes, and to
change the bus API to always return the interface per-address rather than
per-reply. This change also patches the existing clients for resolved
accordingly (nss-resolve + systemd-resolve-host).
This also changes the routing logic for queries slightly: we now ensure
that the local hostname is never resolved via LLMNR, thus making it
trustable on the local system. |
9b644bf921ca3b1f3967a794932c8e56636908db |
|
14-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: never allow routing of "localhost" queries to DNS or LLMNR
We should never allow leaking of "localhost" queries onto the network,
even if there's an explicit domain rotue set for this. |
9df3ba6c6cb65eecec06f39dfe85a3596cedac4e |
|
03-Aug-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: transaction - exponentially increase retry timeouts
Rather than fixing this to 5s for unicast DNS and 1s for LLMNR, start
at a tenth of those values and increase exponentially until the old
values are reached. For LLMNR the recommended timeout for IEEE802
networks (which basically means all of the ones we care about) is 100ms,
so that should be uncontroversial. For unicast DNS I have found no
recommended value. However, it seems vastly more likely that hitting a
500ms timeout is casued by a packet loss, rather than the RTT genuinely
being greater than 500ms, so taking this as a startnig value seems
reasonable to me.
In the common case this greatly reduces the latency due to normal packet
loss. Moreover, once we get support for probing for features, this means
that we can send more packets before degrading the feature level whilst
still allowing us to settle on the correct feature level in a reasonable
timeframe.
The timeouts are tracked per server (or per scope for the multicast
protocols), and once a server (or scope) receives a successfull package
the timeout is reset. We also track the largest RTT for the given
server/scope, and always start our timouts at twice the largest
observed RTT. |
9436e8cae4709b50ed57f2f5858a3ffad03d5d32 |
|
29-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: never attempt to resolve loopback addresses via DNS/LLMNR/mDNS
We already refuse to resolve "localhost", hence we should also refuse
resolving "127.0.0.1" and friends. |
72290734be81e83e6ef9520c07692f68095eb5b2 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: scope - write() unicast DNS packets
As we have connect()ed to the desired DNS server, we no longer need to pass
control messages manually when sending packets. Simplify the logic accordingly. |
471d40d92fc8e7b452dff99a156f9e0b520ded20 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: transaction - introduce dns_transaction_emit()
This function emits the UDP packet via the scope, but first it will
determine the current server (and connect to it) and store the
server in the transaction.
This should not change the behavior, but simplifies the code. |
0db643664cf37111be163c0c64ccd66b519daf34 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: transaction - move DNS UDP socket creation to the scope
With access to the server when creating the socket, we can connect()
to the server and hence simplify message sending and receiving in
follow-up patches. |
0eb99d0a6a7d28a16e739b3a0e4900b9e4dc76f9 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resloved: transaction - unify IPv4 and IPv6 sockets
A transaction can only have one socket at a time, so no need to distinguish these. |
3ea1453c42c4da445a4d4561fc22423b6bbb6d9b |
|
23-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
resolve: drop dns_scope_good_dns_server()
It's not used anymore since 29815b6c608b836cada5e349d06a96b63eaa65f3,
hence let's remove it from the sources. |
d20b1667dbab8bccf69735523a0d5fc645e81b80 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: use one UDP socket per transaction
We used to have one global socket, use one per transaction instead. This
has the side-effect of giving us a random UDP port per transaction, and
hence increasing the entropy and making cache poisoining significantly
harder to achieve.
We still reuse the same port number for packets belonging to the same
transaction (resent packets). |
8300ba218e3cf5049496937be8bce10f22d09bbc |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: pin the server used in a transaction
We want to discover information about the server and use that in when crafting
packets to be resent. |
a0166609f782da91710dea9183d1bf138538db37 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: packet - ensure there is space for IP+UDP headers
Currently we only make sure our links can handle the size of the payload witohut
taking the headers into account. |
8b757a38611006a751c90933d1810cccaa47e1af |
|
13-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: separate LLMNR specific header bits
The C and T bits in the DNS packet header definitions are specific to LLMNR.
In regular DNS, they are called AA and RD instead. Reflect that by calling
the macros accordingly, and alias LLMNR specific macros.
While at it, define RA, AD and CD getters as well. |
22a37591ede1e9d5f325d6f10495cc91b40b775f |
|
13-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: use a #define for LLMNR port
De-duplicate some magic numbers. |
5f402ae84bbc08fe8de5682e371b3f66c387da52 |
|
13-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: move LLMNR related functions into separate file |
4ad7f2761da661853dcc29d542efb4727abb1101 |
|
10-Jun-2015 |
Nick Owens <nick.owens@coreos.com> |
resolve: move dns routines into shared |
958b66ea16deddd794b3a52643bd44633e165ead |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split all hostname related calls into hostname-util.c |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
dc75168823540076b354135f6e2de7a9a978fbca |
|
14-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use space after a silencing (void)
We were using a space more often than not, and this way is
codified in CODING_STYLE. |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
d076c6f9e486587d634d59082d2a13b9cbb4aef3 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
networkd/resolved: correct spacing near eol in code comments |
77209c3505fa856dae23ae566b729c862a9b71f4 |
|
03-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: don't resolve the hostname "gateway" with LLMNR, leave that to nss-myhostname |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
Using:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg;
print;'
$f
done
And a couple of manual whitespace fixups. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
0c9eefb7e3a39db832313b8411a4dcb9fdfe3607 |
|
17-Nov-2014 |
Susant Sahani <susant@redhat.com> |
resolve: fix CID#1237549 Unchecked return value |
1e43061b67336052b5b231840a38508a5397a363 |
|
23-Oct-2014 |
Michal Schmidt <mschmidt@redhat.com> |
resolve: make DnsScope::conflict_queue an OrderedHashmap
on_conflict_dispatch() uses hashmap_steal_first() and then does
something non-trivial with it. It may care about the order. |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory. |
4de120ee442797bc30ecfd25b4d539cac9cb56ce |
|
15-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix assertion when joining llmnr mcast group |
5ba73e9b646af4d8109a5a633aa235665858144d |
|
14-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: clarify that LLMNR scopes must have a link assigned
This is supposed to remove some compiler warnings:
http://lists.freedesktop.org/archives/systemd-devel/2014-July/021393.html |
51323288fc628a5cac50914df915545d685b793e |
|
14-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: allow passing on which protocol, family and interface to look something up
Also, return on which protocol/family/interface we found something. |
a407657425a3e47fd2b559cd3bc800f791303f63 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement full LLMNR conflict detection logic |
6e0684729420912df019cc64d3f8a3c8290cc5f1 |
|
05-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add 100ms initial jitter to all LLMNR requests |
aea2429d6ec32261dbf6b9caa125fcc6ea9ea76a |
|
05-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: enforce ratelimit on LLMNR traffic |
dc4d47e2c79aafa3ef646e32ff3422c4ce935c1b |
|
05-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: never reuse transactions for probing that are already completed based on cached data |
75cd513ef830d8e00d0d2d6a64917fec533315db |
|
03-Aug-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
resolved: avoid possible dereference of null pointer
In dns_scope_make_reply_packet the structs q, answer, and soa can be
null. We should check for null before reading their fields. |
7b4c2ee75faf08b7a415337b46efc670f986128a |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: always drop multicast membership before adding one
This is apparently necessary on some devices, such as veth. |
2c27fbca2d88214bd305272308a370a962818f1e |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: flush cache each time we change to a different DNS server |
4e945a6f7971fd7d1f6b2c62ee3afdaff3c95ce4 |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: beef up DNS server configuration logic
We now maintain two lists of DNS servers: system servers and fallback
servers.
system servers are used in combination with any per-link servers.
fallback servers are only used if there are no system servers or
per-link servers configured.
The system server list is supposed to be populated from a foreign tool's
/etc/resolv.conf (not implemented yet).
Also adds a configuration switch for LLMNR, that allows configuring
whether LLMNR shall be used simply for resolving or also for responding. |
ec2c5e4398f9d65e5dfe61530f2556224733d1e6 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement LLMNR uniqueness verification |
fcf57f9cf706ff5be2b5e6d41b2ac48e3e98467b |
|
30-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: don't attempt to order empty answer array |
8bf52d3d17d364438191077d0750b8b80b5dc53a |
|
30-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: include SOA records in LLMNR replies for non-existing RRs to allow negative caching |
af93291cc4cbd2fe2fb4af7d3c56138fb39f31dc |
|
30-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: when answer A or AAAA questions, order responses by whether addresses are link-local or not |
2442b93d15f5523aba0c5dc56a42757af889c483 |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: the llmnr destination address check applies to queries, not to responses |
bf3f1271e2cc0c22b11c8a805a997578dabe9191 |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: set LLMNR TCP and UDP TTLs to the values suggested by the RFC |
ea917db9e662ae6e6d0ae07e0118b323688c8616 |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: discard more invalid llmnr messages |
b914e211f3a40f507b3cdc572838ec7f3fd5e4cf |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: when resolving an address PTR record via llmnr, make a tcp connection by default |
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbf |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolve: add llmnr responder side for UDP and TCP
Name defending is still missing. |
faa133f3aa7a18f26563dc5d6b95898cb315c37a |
|
23-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework logic so that we can share transactions between queries of different clients |
901fd8164797f3eeb9921c85915dc409d49ab5d8 |
|
19-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: do not use unitialized variable |
46f08bea4b09e2cce4b50e3c082df4a92a22598c |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
in-addr-util: remove family_to_string() API
we already have a more complete one with af_to_name(), that is generated
from the header files, no need to duplicate this. |
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
change type for address family to "int"
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. |
1716f6dcf54d4c181c2e2558e3d5414f54c8d9ca |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add LLMNR support for looking up names |
322345fdb9865ef2477fba8e4bdde0e1183ef505 |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add DNS cache |
b45d9e86e41c453e0b57f2f8316bef06dee42e5a |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix check for mdns names |
faec72d5dedae93f43c2dd624de1392ed9bacd80 |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: we are never authoritative for localhost |
e1c959948c0e31d6997bcdfbabfbd077784b2bae |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly handle MTU logic |
ad867662936a4c7ab2c7116d804c272338801231 |
|
16-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: support for TCP DNS queries |
74b2466e14a1961bf3ac0e8a60cfaceec705bd59 |
|
16-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a DNS client stub resolver
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) |