diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-09-03 10:45:26 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-09-11 21:35:47 +0200 |
commit | 14dc0fc4ef069080253ce109e87d929d52e19c82 (patch) | |
tree | 6df3fb8d82e27fba6bec03c4357938850d3f49d2 /src/resolve | |
parent | pcrlock: remove empty components from our list (diff) | |
download | systemd-14dc0fc4ef069080253ce109e87d929d52e19c82.tar.xz systemd-14dc0fc4ef069080253ce109e87d929d52e19c82.zip |
resolved: simplify initialization of DnsScope
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-dns-scope.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 4d4e952dac..5292b11405 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -42,7 +42,9 @@ int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, int .protocol = protocol, .family = family, .resend_timeout = MULTICAST_RESEND_TIMEOUT_MIN_USEC, - .mdns_goodbye_event_source = NULL, + + /* Enforce ratelimiting for the multicast protocols */ + .ratelimit = { MULTICAST_RATELIMIT_INTERVAL_USEC, MULTICAST_RATELIMIT_BURST }, }; if (protocol == DNS_PROTOCOL_DNS) { @@ -72,9 +74,6 @@ int dns_scope_new(Manager *m, DnsScope **ret, Link *l, DnsProtocol protocol, int log_debug("New scope on link %s, protocol %s, family %s", l ? l->ifname : "*", dns_protocol_to_string(protocol), family == AF_UNSPEC ? "*" : af_to_name(family)); - /* Enforce ratelimiting for the multicast protocols */ - s->ratelimit = (const RateLimit) { MULTICAST_RATELIMIT_INTERVAL_USEC, MULTICAST_RATELIMIT_BURST }; - *ret = s; return 0; } |