committed by
Yu Watanabe
parent
572c1fe685
commit
284d76414e
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "dns-type.h"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "forward.h"
|
||||
|
||||
/* DNS record types, taken from
|
||||
* http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "fuzz.h"
|
||||
#include "memory-util.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "fuzz.h"
|
||||
#include "memory-util.h"
|
||||
#include "memstream-util.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "string-util.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
_cleanup_(dns_resource_record_unrefp) DnsResourceRecord *rr = NULL, *copy = NULL;
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <getopt.h>
|
||||
#include <net/if.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "build.h"
|
||||
#include "constants.h"
|
||||
#include "dns-domain.h"
|
||||
#include "extract-word.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "parse-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "resolvconf-compat.h"
|
||||
#include "resolvectl.h"
|
||||
#include "resolved-def.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
|
||||
static int resolvconf_help(void) {
|
||||
_cleanup_free_ char *link = NULL;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-json.h"
|
||||
#include "sd-netlink.h"
|
||||
#include "sd-varlink.h"
|
||||
@@ -22,6 +23,7 @@
|
||||
#include "bus-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "errno-list.h"
|
||||
#include "errno-util.h"
|
||||
#include "escape.h"
|
||||
#include "format-ifname.h"
|
||||
#include "format-table.h"
|
||||
@@ -36,7 +38,6 @@
|
||||
#include "parse-util.h"
|
||||
#include "polkit-agent.h"
|
||||
#include "pretty-print.h"
|
||||
#include "process-util.h"
|
||||
#include "resolvconf-compat.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolvectl.h"
|
||||
@@ -48,8 +49,10 @@
|
||||
#include "sort-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
#include "varlink-util.h"
|
||||
#include "verb-log-control.h"
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <in-addr-util.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include "forward.h"
|
||||
|
||||
typedef enum ExecutionMode {
|
||||
MODE_RESOLVE_HOST,
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-get-properties.h"
|
||||
#include "bus-locator.h"
|
||||
#include "bus-log-control-api.h"
|
||||
#include "bus-message-util.h"
|
||||
#include "bus-object.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "bus-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "format-util.h"
|
||||
#include "memory-util.h"
|
||||
#include "path-util.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-bus.h"
|
||||
@@ -30,18 +32,15 @@
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-dns-synthesize.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
#include "resolved-dns-trust-anchor.h"
|
||||
#include "resolved-dnssd.h"
|
||||
#include "resolved-dnssd-bus.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-link-bus.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-resolv-conf.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "stdio-util.h"
|
||||
#include "strv.h"
|
||||
#include "syslog-util.h"
|
||||
#include "user-util.h"
|
||||
#include "string-util.h"
|
||||
#include "utf8.h"
|
||||
|
||||
BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_resolve_support, resolve_support, ResolveSupport);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "bus-object.h"
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
extern const BusObjectImplementation manager_object;
|
||||
|
||||
|
||||
@@ -2,26 +2,19 @@
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-parser.h"
|
||||
#include "constants.h"
|
||||
#include "creds-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "extract-word.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "parse-util.h"
|
||||
#include "ordered-set.h"
|
||||
#include "proc-cmdline.h"
|
||||
#include "resolved-conf.h"
|
||||
#include "resolved-dns-search-domain.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-dnssd.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "specifier.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "utf8.h"
|
||||
|
||||
DEFINE_CONFIG_PARSE_ENUM(config_parse_dns_stub_listener_mode, dns_stub_listener_mode, DnsStubListenerMode);
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "conf-parser.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum ResolveConfigSource {
|
||||
RESOLVE_CONFIG_SOURCE_FILE,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "resolved-forward.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* Input + Output: The various protocols we can use */
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include "log.h"
|
||||
#include "random-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "siphash24.h"
|
||||
#include "string-util.h"
|
||||
|
||||
static DnsAnswerItem *dns_answer_item_free(DnsAnswerItem *item) {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "macro.h"
|
||||
#include "ordered-set.h"
|
||||
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
/* A simple array of resource records. We keep track of the originating ifindex for each RR where that makes
|
||||
* sense, so that we can qualify A and AAAA RRs referring to a local link with the right ifindex.
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <net/if.h>
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "dns-domain.h"
|
||||
#include "format-ifname.h"
|
||||
#include "log.h"
|
||||
#include "prioq.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-cache.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* Never cache more than 4K entries. RFC 1536, Section 5 suggests to
|
||||
* leave DNS caches unbounded, but that's crazy. */
|
||||
|
||||
@@ -1,22 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "prioq.h"
|
||||
#include "resolve-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef enum DnsProtocol DnsProtocol;
|
||||
typedef enum DnssecResult DnssecResult;
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct DnsCache {
|
||||
Hashmap *by_key;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-get-properties.h"
|
||||
#include "bus-object.h"
|
||||
#include "hashmap.h"
|
||||
#include "resolved-bus.h"
|
||||
#include "resolved-dns-delegate.h"
|
||||
#include "resolved-dns-delegate-bus.h"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef struct BusObjectImplementation BusObjectImplementation;
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
extern const BusObjectImplementation dns_delegate_object;
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "constants.h"
|
||||
#include "dns-domain.h"
|
||||
#include "extract-word.h"
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "resolved-dns-delegate.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
@@ -11,6 +16,7 @@
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
#define DNS_DELEGATES_MAX 4096U
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "list.h"
|
||||
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
#define DELEGATE_SEARCH_DOMAINS_MAX 256
|
||||
#define DELEGATE_DNS_SERVERS_MAX 256
|
||||
@@ -16,7 +10,7 @@ typedef struct Manager Manager;
|
||||
/* A DnsDelegate object is used to manage additional, explicitly configured unicast DNS lookup scopes,
|
||||
* independent from any network link and from the global scope. */
|
||||
|
||||
struct DnsDelegate {
|
||||
typedef struct DnsDelegate {
|
||||
Manager *manager;
|
||||
char *id;
|
||||
|
||||
@@ -32,7 +26,7 @@ struct DnsDelegate {
|
||||
DnsScope *scope;
|
||||
|
||||
LIST_FIELDS(DnsDelegate, delegates);
|
||||
};
|
||||
} DnsDelegate;
|
||||
|
||||
int dns_delegate_new(Manager *m, const char *id, DnsDelegate **ret);
|
||||
DnsDelegate *dns_delegate_free(DnsDelegate *d);
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
@@ -12,10 +11,11 @@
|
||||
#include "openssl-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "sort-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#if HAVE_OPENSSL && OPENSSL_VERSION_MAJOR >= 3
|
||||
DISABLE_WARNING_DEPRECATED_DECLARATIONS;
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnssecResult {
|
||||
/* These six are returned by dnssec_verify_rrset() */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "dns-domain.h"
|
||||
#include "escape.h"
|
||||
#include "log.h"
|
||||
@@ -10,9 +11,11 @@
|
||||
#include "resolved-dns-question.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "set.h"
|
||||
#include "siphash24.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
#include "unaligned.h"
|
||||
#include "utf8.h"
|
||||
|
||||
|
||||
@@ -5,19 +5,12 @@
|
||||
#include <netinet/ip6.h>
|
||||
#include <netinet/udp.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
#include "resolved-def.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-forward.h"
|
||||
#include "sparse-endian.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
|
||||
typedef enum DnsProtocol {
|
||||
DNS_PROTOCOL_DNS,
|
||||
DNS_PROTOCOL_MDNS,
|
||||
@@ -58,7 +51,7 @@ assert_cc(sizeof(DnsPacketHeader) == 12);
|
||||
/* With EDNS0 we can use larger packets, default to 1232, which is what is commonly used */
|
||||
#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 1232u
|
||||
|
||||
struct DnsPacket {
|
||||
typedef struct DnsPacket {
|
||||
unsigned n_ref;
|
||||
DnsProtocol protocol;
|
||||
size_t size, allocated, rindex, max_size, fragsize;
|
||||
@@ -88,7 +81,7 @@ struct DnsPacket {
|
||||
bool canonical_form;
|
||||
|
||||
/* Note: fields should be ordered to minimize alignment gaps. Use pahole! */
|
||||
};
|
||||
} DnsPacket;
|
||||
|
||||
static inline uint8_t* DNS_PACKET_DATA(const DnsPacket *p) {
|
||||
if (_unlikely_(!p))
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "event-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "local-addresses.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-query.h"
|
||||
@@ -14,12 +16,12 @@
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-search-domain.h"
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-dns-synthesize.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
#include "resolved-etc-hosts.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-timeouts.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
|
||||
#define QUERIES_MAX 2048
|
||||
|
||||
@@ -1,29 +1,13 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "resolved-def.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
#include "set.h"
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsQueryCandidate DnsQueryCandidate;
|
||||
typedef struct DnsQuery DnsQuery;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct DnsStubListenerExtra DnsStubListenerExtra;
|
||||
typedef struct Manager Manager;
|
||||
|
||||
struct DnsQueryCandidate {
|
||||
typedef struct DnsQueryCandidate {
|
||||
unsigned n_ref;
|
||||
int error_code;
|
||||
|
||||
@@ -37,9 +21,9 @@ struct DnsQueryCandidate {
|
||||
|
||||
LIST_FIELDS(DnsQueryCandidate, candidates_by_query);
|
||||
LIST_FIELDS(DnsQueryCandidate, candidates_by_scope);
|
||||
};
|
||||
} DnsQueryCandidate;
|
||||
|
||||
struct DnsQuery {
|
||||
typedef struct DnsQuery {
|
||||
Manager *manager;
|
||||
|
||||
/* The question, formatted in IDNA for use on classic DNS, and as UTF8 for use in LLMNR or mDNS. Note
|
||||
@@ -129,7 +113,7 @@ struct DnsQuery {
|
||||
LIST_FIELDS(DnsQuery, auxiliary_queries);
|
||||
|
||||
/* Note: fields should be ordered to minimize alignment gaps. Use pahole! */
|
||||
};
|
||||
} DnsQuery;
|
||||
|
||||
enum {
|
||||
DNS_QUERY_MATCH,
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-question.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
DnsQuestion *dns_question_new(size_t n) {
|
||||
DnsQuestion *q;
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
/* A simple array of resource keys */
|
||||
|
||||
|
||||
@@ -3,20 +3,24 @@
|
||||
#include <math.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "escape.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "json-util.h"
|
||||
#include "log.h"
|
||||
#include "memory-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "siphash24.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "time-util.h"
|
||||
#include "unaligned.h"
|
||||
|
||||
DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name) {
|
||||
|
||||
@@ -3,21 +3,10 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "bitmap.h"
|
||||
#include "dns-def.h"
|
||||
#include "dns-type.h"
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
typedef struct DnsTxtItem DnsTxtItem;
|
||||
typedef struct DnsSvcParam DnsSvcParam;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
/* DNSKEY RR flags */
|
||||
#define DNSKEY_FLAG_SEP (UINT16_C(1) << 0)
|
||||
@@ -68,11 +57,11 @@ enum {
|
||||
_NSEC3_ALGORITHM_MAX_DEFINED
|
||||
};
|
||||
|
||||
struct DnsResourceKey {
|
||||
typedef struct DnsResourceKey {
|
||||
unsigned n_ref; /* (unsigned -1) for const keys, see below */
|
||||
uint16_t class, type;
|
||||
char *_name; /* don't access directly, use dns_resource_key_name()! */
|
||||
};
|
||||
} DnsResourceKey;
|
||||
|
||||
/* Creates a temporary resource key. This is only useful to quickly
|
||||
* look up something, without allocating a full DnsResourceKey object
|
||||
@@ -86,13 +75,13 @@ struct DnsResourceKey {
|
||||
._name = (char*) n, \
|
||||
})
|
||||
|
||||
struct DnsTxtItem {
|
||||
typedef struct DnsTxtItem {
|
||||
size_t length;
|
||||
LIST_FIELDS(DnsTxtItem, items);
|
||||
uint8_t data[];
|
||||
};
|
||||
} DnsTxtItem;
|
||||
|
||||
struct DnsSvcParam {
|
||||
typedef struct DnsSvcParam {
|
||||
uint16_t key;
|
||||
size_t length;
|
||||
LIST_FIELDS(DnsSvcParam, params);
|
||||
@@ -101,9 +90,9 @@ struct DnsSvcParam {
|
||||
DECLARE_FLEX_ARRAY(struct in_addr, value_in_addr);
|
||||
DECLARE_FLEX_ARRAY(struct in6_addr, value_in6_addr);
|
||||
};
|
||||
};
|
||||
} DnsSvcParam;
|
||||
|
||||
struct DnsResourceRecord {
|
||||
typedef struct DnsResourceRecord {
|
||||
unsigned n_ref;
|
||||
uint32_t ttl;
|
||||
usec_t expiry; /* RRSIG signature expiry */
|
||||
@@ -284,7 +273,7 @@ struct DnsResourceRecord {
|
||||
};
|
||||
|
||||
/* Note: fields should be ordered to minimize alignment gaps. Use pahole! */
|
||||
};
|
||||
} DnsResourceRecord;
|
||||
|
||||
/* We use uint8_t for label counts above, and UINT8_MAX/-1 has special meaning. */
|
||||
assert_cc(DNS_N_LABELS_MAX < UINT8_MAX);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
@@ -9,7 +12,7 @@
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "missing_network.h"
|
||||
#include "log.h"
|
||||
#include "random-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-delegate.h"
|
||||
@@ -29,9 +32,9 @@
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-mdns.h"
|
||||
#include "resolved-timeouts.h"
|
||||
#include "set.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-table.h"
|
||||
#include "strv.h"
|
||||
|
||||
#define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC)
|
||||
#define MULTICAST_RATELIMIT_BURST 1000
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "dns-def.h"
|
||||
#include "forward.h"
|
||||
#include "list.h"
|
||||
#include "ratelimit.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-dns-cache.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-zone.h"
|
||||
#include "socket-util.h"
|
||||
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
typedef struct DnsQuery DnsQuery;
|
||||
typedef struct DnsQueryCandidate DnsQueryCandidate;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct Link Link;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnsScopeMatch {
|
||||
DNS_SCOPE_NO,
|
||||
@@ -40,7 +29,7 @@ typedef enum DnsScopeOrigin {
|
||||
_DNS_SCOPE_ORIGIN_INVALID = -EINVAL,
|
||||
} DnsScopeOrigin;
|
||||
|
||||
struct DnsScope {
|
||||
typedef struct DnsScope {
|
||||
Manager *manager;
|
||||
|
||||
DnsScopeOrigin origin;
|
||||
@@ -84,7 +73,7 @@ struct DnsScope {
|
||||
LIST_FIELDS(DnsScope, scopes);
|
||||
|
||||
bool announced;
|
||||
};
|
||||
} DnsScope;
|
||||
|
||||
int dns_scope_new(Manager *m, DnsScope **ret, DnsScopeOrigin origin, Link *link, DnsDelegate *delegate, DnsProtocol protocol, int family);
|
||||
DnsScope* dns_scope_free(DnsScope *s);
|
||||
|
||||
@@ -1,16 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "list.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct Link Link;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnsSearchDomainType {
|
||||
DNS_SEARCH_DOMAIN_SYSTEM,
|
||||
@@ -18,7 +10,7 @@ typedef enum DnsSearchDomainType {
|
||||
DNS_SEARCH_DOMAIN_DELEGATE,
|
||||
} DnsSearchDomainType;
|
||||
|
||||
struct DnsSearchDomain {
|
||||
typedef struct DnsSearchDomain {
|
||||
Manager *manager;
|
||||
|
||||
unsigned n_ref;
|
||||
@@ -34,7 +26,7 @@ struct DnsSearchDomain {
|
||||
|
||||
bool linked:1;
|
||||
LIST_FIELDS(DnsSearchDomain, domains);
|
||||
};
|
||||
} DnsSearchDomain;
|
||||
|
||||
int dns_search_domain_new(
|
||||
Manager *m,
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <net/if_arp.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "errno-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "hash-funcs.h"
|
||||
#include "json-util.h"
|
||||
#include "resolved-bus.h"
|
||||
#include "resolved-dns-cache.h"
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-search-domain.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-resolv-conf.h"
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "socket-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* The amount of time to wait before retrying with a full feature set */
|
||||
#define DNS_SERVER_FEATURE_GRACE_PERIOD_MAX_USEC (6 * USEC_PER_HOUR)
|
||||
|
||||
@@ -1,22 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "forward.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-conf.h"
|
||||
#include "resolved-dnstls.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct Link Link;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnsServerType {
|
||||
DNS_SERVER_SYSTEM,
|
||||
@@ -51,7 +41,7 @@ typedef enum DnsServerFeatureLevel {
|
||||
const char* dns_server_feature_level_to_string(DnsServerFeatureLevel i) _const_;
|
||||
DnsServerFeatureLevel dns_server_feature_level_from_string(const char *s) _pure_;
|
||||
|
||||
struct DnsServer {
|
||||
typedef struct DnsServer {
|
||||
Manager *manager;
|
||||
|
||||
unsigned n_ref;
|
||||
@@ -110,7 +100,7 @@ struct DnsServer {
|
||||
|
||||
/* Tri-state to indicate if the DNS server is accessible. */
|
||||
int accessible;
|
||||
};
|
||||
} DnsServer;
|
||||
|
||||
int dns_server_new(
|
||||
Manager *m,
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <linux/if_arp.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "macro.h"
|
||||
#include "log.h"
|
||||
#include "missing_network.h"
|
||||
#include "ordered-set.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-dns-stream.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "set.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#define DNS_STREAMS_MAX 128
|
||||
|
||||
|
||||
@@ -1,20 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "forward.h"
|
||||
#include "list.h"
|
||||
#include "ordered-set.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dnstls.h"
|
||||
#include "resolved-forward.h"
|
||||
#include "socket-util.h"
|
||||
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct DnsTransaction DnsTransaction;
|
||||
typedef struct Manager Manager;
|
||||
typedef struct DnsStubListenerExtra DnsStubListenerExtra;
|
||||
#include "sparse-endian.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* Various timeouts for establishing TCP connections. First the default timeout for that. */
|
||||
#define DNS_STREAM_DEFAULT_TIMEOUT_USEC (10 * USEC_PER_SEC)
|
||||
@@ -46,7 +40,7 @@ typedef enum DnsStreamType {
|
||||
* 3. The DNS stub logic when accepting a TCP-based lookup
|
||||
*/
|
||||
|
||||
struct DnsStream {
|
||||
typedef struct DnsStream {
|
||||
Manager *manager;
|
||||
unsigned n_ref;
|
||||
|
||||
@@ -94,7 +88,7 @@ struct DnsStream {
|
||||
DnsStubListenerExtra *stub_listener_extra;
|
||||
|
||||
LIST_FIELDS(DnsStream, streams);
|
||||
};
|
||||
} DnsStream;
|
||||
|
||||
int dns_stream_new(
|
||||
Manager *m,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <net/if_arp.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "capability-util.h"
|
||||
#include "dns-type.h"
|
||||
@@ -10,7 +12,6 @@
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "missing_network.h"
|
||||
#include "missing_socket.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
@@ -21,10 +22,13 @@
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "set.h"
|
||||
#include "siphash24.h"
|
||||
#include "socket-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* The MTU of the loopback device is 64K on Linux, advertise that as maximum datagram size, but subtract the Ethernet,
|
||||
* IP and UDP header sizes */
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
|
||||
typedef struct DnsStubListenerExtra DnsStubListenerExtra;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnsStubListenerMode {
|
||||
DNS_STUB_LISTENER_NO,
|
||||
@@ -18,7 +13,7 @@ typedef enum DnsStubListenerMode {
|
||||
_DNS_STUB_LISTENER_MODE_INVALID = -EINVAL,
|
||||
} DnsStubListenerMode;
|
||||
|
||||
struct DnsStubListenerExtra {
|
||||
typedef struct DnsStubListenerExtra {
|
||||
Manager *manager;
|
||||
|
||||
DnsStubListenerMode mode;
|
||||
@@ -31,7 +26,7 @@ struct DnsStubListenerExtra {
|
||||
sd_event_source *tcp_event_source;
|
||||
|
||||
Hashmap *queries_by_packet;
|
||||
};
|
||||
} DnsStubListenerExtra;
|
||||
|
||||
extern const struct hash_ops dns_stub_listener_extra_hash_ops;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "env-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "local-addresses.h"
|
||||
#include "log.h"
|
||||
#include "missing_network.h"
|
||||
#include "resolved-def.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum DnsProtocol DnsProtocol;
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
int dns_synthesize_family(uint64_t flags);
|
||||
DnsProtocol dns_synthesize_protocol(uint64_t flags);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "af-list.h"
|
||||
@@ -9,6 +10,7 @@
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "log.h"
|
||||
#include "random-util.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-cache.h"
|
||||
@@ -18,13 +20,17 @@
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-dns-stream.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
#include "resolved-dnstls.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-llmnr.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-socket-graveyard.h"
|
||||
#include "resolved-timeouts.h"
|
||||
#include "set.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
|
||||
#define TRANSACTIONS_MAX 4096
|
||||
|
||||
@@ -473,7 +479,7 @@ static void dns_transaction_complete_errno(DnsTransaction *t, int error) {
|
||||
assert(t);
|
||||
assert(error != 0);
|
||||
|
||||
t->answer_errno = abs(error);
|
||||
t->answer_errno = ABS(error);
|
||||
dns_transaction_complete(t, DNS_TRANSACTION_ERRNO);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "resolved-def.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "set.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct DnsTransaction DnsTransaction;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef enum DnsTransactionState {
|
||||
DNS_TRANSACTION_NULL,
|
||||
@@ -52,7 +41,7 @@ typedef enum DnsTransactionSource {
|
||||
_DNS_TRANSACTION_SOURCE_INVALID = -EINVAL,
|
||||
} DnsTransactionSource;
|
||||
|
||||
struct DnsTransaction {
|
||||
typedef struct DnsTransaction {
|
||||
DnsScope *scope;
|
||||
|
||||
DnsResourceKey *key; /* For regular lookups the RR key to look for */
|
||||
@@ -149,7 +138,7 @@ struct DnsTransaction {
|
||||
LIST_FIELDS(DnsTransaction, transactions_by_key);
|
||||
|
||||
/* Note: fields should be ordered to minimize alignment gaps. Use pahole! */
|
||||
};
|
||||
} DnsTransaction;
|
||||
|
||||
int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key, DnsPacket *bypass, uint64_t flags);
|
||||
DnsTransaction* dns_transaction_free(DnsTransaction *t);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "conf-files.h"
|
||||
#include "constants.h"
|
||||
#include "dns-domain.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "hexdecoct.h"
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "hashmap.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
/* This contains a fixed database mapping domain names to DS or DNSKEY records. */
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
@@ -11,6 +14,7 @@
|
||||
#include "resolved-dns-zone.h"
|
||||
#include "resolved-dnssd.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
|
||||
/* Never allow more than 1K entries */
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "list.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsTransaction DnsTransaction;
|
||||
typedef struct DnsZoneItem DnsZoneItem;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct DnsZone {
|
||||
Hashmap *by_key;
|
||||
@@ -29,7 +22,7 @@ typedef enum DnsZoneItemState {
|
||||
DNS_ZONE_ITEM_WITHDRAWN,
|
||||
} DnsZoneItemState;
|
||||
|
||||
struct DnsZoneItem {
|
||||
typedef struct DnsZoneItem {
|
||||
DnsScope *scope;
|
||||
DnsResourceRecord *rr;
|
||||
|
||||
@@ -43,7 +36,7 @@ struct DnsZoneItem {
|
||||
LIST_FIELDS(DnsZoneItem, by_name);
|
||||
|
||||
DnsTransaction *probe_transaction;
|
||||
};
|
||||
} DnsZoneItem;
|
||||
|
||||
void dns_zone_flush(DnsZone *z);
|
||||
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-object.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "hashmap.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dnssd.h"
|
||||
#include "resolved-dnssd-bus.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "strv.h"
|
||||
#include "user-util.h"
|
||||
|
||||
int bus_dnssd_method_unregister(sd_bus_message *message, void *userdata, sd_bus_error *error) {
|
||||
DnssdService *s = ASSERT_PTR(userdata);
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "bus-object.h"
|
||||
#include "forward.h"
|
||||
|
||||
extern const BusObjectImplementation dnssd_object;
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "constants.h"
|
||||
#include "dns-domain.h"
|
||||
#include "extract-word.h"
|
||||
#include "hashmap.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "path-util.h"
|
||||
#include "resolved-conf.h"
|
||||
@@ -13,6 +17,7 @@
|
||||
#include "resolved-dnssd.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "specifier.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "utf8.h"
|
||||
|
||||
|
||||
@@ -4,28 +4,22 @@
|
||||
|
||||
#include "list.h"
|
||||
#include "resolved-conf.h"
|
||||
|
||||
typedef struct DnssdService DnssdService;
|
||||
typedef struct DnssdTxtData DnssdTxtData;
|
||||
|
||||
typedef struct Manager Manager;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
typedef struct DnsTxtItem DnsTxtItem;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
enum {
|
||||
DNS_TXT_ITEM_TEXT,
|
||||
DNS_TXT_ITEM_DATA,
|
||||
};
|
||||
|
||||
struct DnssdTxtData {
|
||||
typedef struct DnssdTxtData {
|
||||
DnsResourceRecord *rr;
|
||||
|
||||
LIST_HEAD(DnsTxtItem, txts);
|
||||
|
||||
LIST_FIELDS(DnssdTxtData, items);
|
||||
};
|
||||
} DnssdTxtData;
|
||||
|
||||
struct DnssdService {
|
||||
typedef struct DnssdService {
|
||||
char *path;
|
||||
char *id;
|
||||
char *name_template;
|
||||
@@ -50,7 +44,7 @@ struct DnssdService {
|
||||
|
||||
bool withdrawn:1;
|
||||
uid_t originator;
|
||||
};
|
||||
} DnssdService;
|
||||
|
||||
DnssdService *dnssd_service_free(DnssdService *service);
|
||||
DnssdTxtData *dnssd_txtdata_free(DnssdTxtData *txt_data);
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "io-util.h"
|
||||
#include "openssl-util.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-dns-stream.h"
|
||||
#include "resolved-dnstls.h"
|
||||
|
||||
@@ -8,13 +8,8 @@
|
||||
#endif
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct DnsTlsManagerData {
|
||||
SSL_CTX *ctx;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "hostname-util.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-question.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "resolved-dns-synthesize.h"
|
||||
#include "resolved-etc-hosts.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* Recheck /etc/hosts at most once every 2s */
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "set.h"
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct EtcHosts EtcHosts;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct EtcHosts {
|
||||
Hashmap *by_address;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "conf-parser-forward.h" /* IWYU pragma: export */
|
||||
#include "forward.h" /* IWYU pragma: export */
|
||||
|
||||
typedef enum DnsAnswerFlags DnsAnswerFlags;
|
||||
typedef enum DnsCacheMode DnsCacheMode;
|
||||
typedef enum DnsProtocol DnsProtocol;
|
||||
typedef enum DnssecResult DnssecResult;
|
||||
typedef enum DnssecVerdict DnssecVerdict;
|
||||
typedef enum DnsScopeOrigin DnsScopeOrigin;
|
||||
typedef enum DnsTransactionState DnsTransactionState;
|
||||
typedef enum ResolveConfigSource ResolveConfigSource;
|
||||
|
||||
typedef struct DnsAnswer DnsAnswer;
|
||||
typedef struct DnsDelegate DnsDelegate;
|
||||
typedef struct DnsPacket DnsPacket;
|
||||
typedef struct DnsQuery DnsQuery;
|
||||
typedef struct DnsQueryCandidate DnsQueryCandidate;
|
||||
typedef struct DnsQuestion DnsQuestion;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnssdService DnssdService;
|
||||
typedef struct DnssdTxtData DnssdTxtData;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct DnsStubListenerExtra DnsStubListenerExtra;
|
||||
typedef struct DnsSvcParam DnsSvcParam;
|
||||
typedef struct DnsTransaction DnsTransaction;
|
||||
typedef struct DnsTxtItem DnsTxtItem;
|
||||
typedef struct DnsZoneItem DnsZoneItem;
|
||||
typedef struct Link Link;
|
||||
typedef struct LinkAddress LinkAddress;
|
||||
typedef struct Manager Manager;
|
||||
typedef struct SocketGraveyard SocketGraveyard;
|
||||
@@ -1,13 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/capability.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-common-errors.h"
|
||||
#include "bus-get-properties.h"
|
||||
#include "bus-message-util.h"
|
||||
#include "bus-object.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "dns-domain.h"
|
||||
#include "log-link.h"
|
||||
@@ -20,12 +21,14 @@
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-link-bus.h"
|
||||
#include "resolved-llmnr.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-mdns.h"
|
||||
#include "resolved-resolv-conf.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "user-util.h"
|
||||
|
||||
static BUS_DEFINE_PROPERTY_GET(property_get_dnssec_supported, "b", Link, link_dnssec_supported);
|
||||
static BUS_DEFINE_PROPERTY_GET2(property_get_dnssec_mode, "s", Link, link_get_dnssec_mode, dnssec_mode_to_string);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "bus-object.h"
|
||||
|
||||
typedef struct Link Link;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
extern const BusObjectImplementation link_object;
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
#include <linux/if.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
#include "sd-network.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "env-file.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
@@ -22,7 +24,9 @@
|
||||
#include "resolved-dns-server.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-llmnr.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-mdns.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-util.h"
|
||||
|
||||
@@ -3,26 +3,16 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "in-addr-util.h"
|
||||
#include "list.h"
|
||||
#include "network-util.h"
|
||||
#include "ratelimit.h"
|
||||
#include "resolve-util.h"
|
||||
|
||||
typedef struct DnsResourceRecord DnsResourceRecord;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct Link Link;
|
||||
typedef struct LinkAddress LinkAddress;
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
#define LINK_SEARCH_DOMAINS_MAX 256
|
||||
#define LINK_DNS_SERVERS_MAX 256
|
||||
|
||||
struct LinkAddress {
|
||||
typedef struct LinkAddress {
|
||||
Link *link;
|
||||
|
||||
int family;
|
||||
@@ -39,9 +29,9 @@ struct LinkAddress {
|
||||
DnsResourceRecord *mdns_ptr_rr;
|
||||
|
||||
LIST_FIELDS(LinkAddress, addresses);
|
||||
};
|
||||
} LinkAddress;
|
||||
|
||||
struct Link {
|
||||
typedef struct Link {
|
||||
Manager *manager;
|
||||
|
||||
int ifindex;
|
||||
@@ -83,7 +73,7 @@ struct Link {
|
||||
char *state_file;
|
||||
|
||||
bool unicast_relevant;
|
||||
};
|
||||
} Link;
|
||||
|
||||
int link_new(Manager *m, Link **ret, int ifindex);
|
||||
Link *link_free(Link *l);
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <resolv.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-transaction.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-forward.h"
|
||||
|
||||
#define LLMNR_PORT 5355
|
||||
|
||||
|
||||
@@ -4,30 +4,28 @@
|
||||
#include <linux/ipv6.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-netlink.h"
|
||||
#include "sd-network.h"
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "daemon-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "errno-util.h"
|
||||
#include "event-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "hostname-setup.h"
|
||||
#include "hostname-util.h"
|
||||
#include "idn-util.h"
|
||||
#include "io-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "json-util.h"
|
||||
#include "memstream-util.h"
|
||||
#include "missing_network.h"
|
||||
#include "missing_socket.h"
|
||||
#include "netlink-util.h"
|
||||
#include "ordered-set.h"
|
||||
#include "parse-util.h"
|
||||
#include "random-util.h"
|
||||
@@ -54,11 +52,10 @@
|
||||
#include "resolved-socket-graveyard.h"
|
||||
#include "resolved-util.h"
|
||||
#include "resolved-varlink.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "set.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "utf8.h"
|
||||
#include "time-util.h"
|
||||
#include "varlink-util.h"
|
||||
|
||||
#define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC)
|
||||
|
||||
@@ -3,34 +3,16 @@
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-netlink.h"
|
||||
#include "sd-network.h"
|
||||
#include "sd-varlink.h"
|
||||
|
||||
#include "common-signal.h"
|
||||
#include "hashmap.h"
|
||||
#include "forward.h"
|
||||
#include "list.h"
|
||||
#include "ordered-set.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-stream.h"
|
||||
#include "resolved-dns-stub.h"
|
||||
#include "resolved-dns-trust-anchor.h"
|
||||
#include "resolved-dnstls.h"
|
||||
#include "resolved-etc-hosts.h"
|
||||
|
||||
typedef enum DnsServerType DnsServerType;
|
||||
|
||||
typedef struct DnsQuery DnsQuery;
|
||||
typedef struct DnsResourceKey DnsResourceKey;
|
||||
typedef struct DnsSearchDomain DnsSearchDomain;
|
||||
typedef struct DnsScope DnsScope;
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct Link Link;
|
||||
typedef struct LinkAddress LinkAddress;
|
||||
typedef struct SocketGraveyard SocketGraveyard;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
#define MANAGER_SEARCH_DOMAINS_MAX 256
|
||||
#define MANAGER_DNS_SERVERS_MAX 256
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <resolv.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-question.h"
|
||||
@@ -17,6 +18,7 @@
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-mdns.h"
|
||||
#include "sort-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#define CLEAR_CACHE_FLUSH(x) (~MDNS_RR_CACHE_FLUSH_OR_QU & (x))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
#define MDNS_PORT 5353
|
||||
#define MDNS_ANNOUNCE_DELAY (1 * USEC_PER_SEC)
|
||||
|
||||
@@ -2,18 +2,15 @@
|
||||
|
||||
#include <resolv.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "label-util.h"
|
||||
#include "log.h"
|
||||
#include "ordered-set.h"
|
||||
#include "path-util.h"
|
||||
#include "resolved-conf.h"
|
||||
#include "resolved-dns-cache.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-search-domain.h"
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
int manager_check_resolv_conf(const Manager *m);
|
||||
int manager_read_resolv_conf(Manager *m);
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-event.h"
|
||||
#include "alloc-util.h"
|
||||
#include "assert-fundamental.h"
|
||||
#include "log.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-socket-graveyard.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#define SOCKET_GRAVEYARD_USEC (5 * USEC_PER_SEC)
|
||||
#define SOCKET_GRAVEYARD_MAX 100
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "list.h"
|
||||
#include "time-util.h"
|
||||
#include "resolved-forward.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
typedef struct SocketGraveyard SocketGraveyard;
|
||||
|
||||
struct SocketGraveyard {
|
||||
typedef struct SocketGraveyard {
|
||||
Manager *manager;
|
||||
usec_t deadline;
|
||||
sd_event_source *io_event_source;
|
||||
LIST_FIELDS(SocketGraveyard, graveyard);
|
||||
};
|
||||
} SocketGraveyard;
|
||||
|
||||
void manager_socket_graveyard_process(Manager *m);
|
||||
void manager_socket_graveyard_clear(Manager *m);
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-polkit.h"
|
||||
#include "dns-domain.h"
|
||||
#include "dns-type.h"
|
||||
#include "errno-util.h"
|
||||
#include "glyph-util.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "json-util.h"
|
||||
@@ -21,7 +24,9 @@
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-varlink.h"
|
||||
#include "set.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "string-util.h"
|
||||
#include "varlink-io.systemd.Resolve.h"
|
||||
#include "varlink-io.systemd.Resolve.Monitor.h"
|
||||
#include "varlink-io.systemd.service.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef struct Manager Manager;
|
||||
#include "resolved-forward.h"
|
||||
|
||||
int manager_varlink_init(Manager *m);
|
||||
void manager_varlink_done(Manager *m);
|
||||
|
||||
@@ -1,24 +1,22 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "bus-log-control-api.h"
|
||||
#include "bus-object.h"
|
||||
#include "capability-util.h"
|
||||
#include "daemon-util.h"
|
||||
#include "label-util.h"
|
||||
#include "log.h"
|
||||
#include "main-func.h"
|
||||
#include "mkdir-label.h"
|
||||
#include "resolved-bus.h"
|
||||
#include "resolved-conf.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "resolved-resolv-conf.h"
|
||||
#include "selinux-util.h"
|
||||
#include "service-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "user-util.h"
|
||||
|
||||
static int run(int argc, char *argv[]) {
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "dns-type.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "tests.h"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "dns-type.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "resolve-util.h"
|
||||
#include "resolved-def.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
@@ -15,6 +17,7 @@
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "tests.h"
|
||||
#include "time-util.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
static DnsCache new_cache(void) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "dns-type.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-question.h"
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <net/if.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fileio.h"
|
||||
#include "glob-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "path-util.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "siphash24.h"
|
||||
#include "tests.h"
|
||||
#include "unaligned.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "log.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-query.h"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
#include "dns-type.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "resolved-dns-question.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "tests.h"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-json.h"
|
||||
|
||||
#include "dns-type.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "tests.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "log.h"
|
||||
#include "resolved-dns-search-domain.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-manager.h"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-question.h"
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "dns-type.h"
|
||||
#include "log.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
#include "resolved-dns-zone.h"
|
||||
#include "resolved-link.h"
|
||||
#include "resolved-manager.h"
|
||||
#include "tests.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <netinet/ip.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "resolved-def.h"
|
||||
#include "string-util.h"
|
||||
#include "tests.h"
|
||||
#include "time-util.h"
|
||||
|
||||
static void prefix_random(const char *name, char **ret) {
|
||||
uint64_t i, u;
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bitmap.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "resolved-dns-answer.h"
|
||||
#include "resolved-dns-dnssec.h"
|
||||
#include "resolved-dns-rr.h"
|
||||
#include "string-util.h"
|
||||
#include "tests.h"
|
||||
#include "time-util.h"
|
||||
|
||||
TEST(dnssec_verify_dns_key) {
|
||||
static const uint8_t ds1_fprint[] = {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "dns-type.h"
|
||||
#include "errno-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "iovec-util.h"
|
||||
#include "log.h"
|
||||
@@ -12,6 +14,8 @@
|
||||
#include "resolved-manager.h"
|
||||
#include "socket-netlink.h"
|
||||
#include "socket-util.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
/* Taken from resolved-dns-stub.c */
|
||||
#define ADVERTISE_DATAGRAM_SIZE_MAX (65536U-14U-20U-8U)
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <malloc.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "argv-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "log.h"
|
||||
#include "resolved-etc-hosts.h"
|
||||
#include "set.h"
|
||||
#include "strv.h"
|
||||
#include "tests.h"
|
||||
#include "tmpfile-util.h"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <linux/if.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-netlink.h"
|
||||
|
||||
#include "netlink-internal.h"
|
||||
#include "resolved-dns-packet.h"
|
||||
#include "resolved-dns-scope.h"
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
@@ -18,7 +15,6 @@
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
#include "random-util.h"
|
||||
@@ -31,6 +27,7 @@
|
||||
#include "resolved-manager.h"
|
||||
#include "sparse-endian.h"
|
||||
#include "tests.h"
|
||||
#include "time-util.h"
|
||||
|
||||
static union sockaddr_union server_address;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user