Zbigniew Jędrzejewski-Szmek
ad161cd6bb
Merge pull request #16951 from yuwata/resolve-follow-ups-for-extra-dns-stub-listener
...
resolve: follow-ups for extra DNS stub listener
2020-09-05 15:55:22 +02:00
Zbigniew Jędrzejewski-Szmek
5615e92efa
Merge pull request #16854 from yuwata/sd-bus-error-set-errnofv
...
sd-bus: rework sd_bus_error_set_errnofv()
2020-09-05 15:47:37 +02:00
Zbigniew Jędrzejewski-Szmek
7de6b05160
Merge pull request #16957 from poettering/sd-bus-proto-def-move
...
three unrelated, minor fixes
2020-09-05 12:06:15 +02:00
Lennart Poettering
8d91b2206c
varlink: properly allocate connection event source
...
Let's make sure we keep a reference to the event source
(Note that this code is currently not used, which is why this was never
used: in all cases we do not add listener fds after the event is
attached, but before. In that case this code is not called.)
2020-09-04 23:54:14 +02:00
Lennart Poettering
1ba37106b3
ptyfwd: don't set prio if event source that might not exist
...
We support read-only ptyfwd options, and on those the input event source
won't be allocated. Deal with that and don't invoke a function on it
that will then instantly fail.
2020-09-04 23:52:41 +02:00
Lennart Poettering
fb2cfa6c13
sd-bus: move SD_BUS_MAXIMUM_(SIGNATURE|NAME)_LENGTH to sd-bus-protocol.h
...
So far we kept all defines directly originating from the spec in
sd-bus-protocol.h, do this for this too.
The precise place doesn't matter much API-wise given that sd-bus.h includes
sd-bus-protocol.h, hence let's just clean this up.
2020-09-04 23:51:21 +02:00
Luca Boccassi
836540070d
core: add [Enable|Disable]UnitFilesWithFlags DBUS methods
...
The new methods work as the unflavoured ones, but takes flags as a
single uint64_t DBUS parameters instead of different booleans, so
that it can be extended without breaking backward compatibility.
Add new flag to allow adding/removing symlinks in
[/etc|/run]/systemd/system.attached so that portable services
configuration files can be self-contained in those directories, without
affecting the system services directories.
Use the new methods and flags from portablectl --enable.
Useful in case /etc is read-only, with only the portable services
directories being mounted read-write.
2020-09-04 17:56:37 +02:00
Yu Watanabe
f3f14c573b
util: constify the second argument of set_get()
2020-09-04 17:52:26 +02:00
Yu Watanabe
89f7435d0c
resolve: use correct fd for UDP stub listner
2020-09-04 23:54:35 +09:00
Yu Watanabe
d1fb8cdae2
resolve: do not check sender and destination for packet received by extra DNS stub listner
2020-09-04 23:54:35 +09:00
Yu Watanabe
7216a3b5dc
resolve: use sd_event_source_set_io_fd_own() for stub listners
2020-09-04 23:54:35 +09:00
Yu Watanabe
bf22f231cf
resolve: introduce dns_stub_listener_extra_free() and set it as a key destructor
2020-09-04 23:54:35 +09:00
Yu Watanabe
1c17bcb3ad
resolve: adjust error messages
2020-09-04 23:54:35 +09:00
Yu Watanabe
af8b138422
resolve: do not set IPv4 specific options on IPv6 socket
2020-09-04 23:54:30 +09:00
Yu Watanabe
d40f00d798
resolve: do not set IP_TTL for extra DNS stub listeners
2020-09-04 23:53:22 +09:00
Yu Watanabe
180c22328b
missing: add IPV6_FREEBIND
2020-09-04 23:53:18 +09:00
Lennart Poettering
e825610499
Merge pull request #16880 from yuwata/network-dhcp4-cleanups
...
network: DHCPv4 cleanups
2020-09-04 15:54:27 +02:00
Yu Watanabe
fc7676e313
util: drop unused socket_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
ca8b62b522
resolve: use in_addr_union to store addresses for extra dns stub listeners
2020-09-04 20:05:58 +09:00
Yu Watanabe
b4b7ea1b32
resolve: fix indentation
2020-09-04 20:05:58 +09:00
Yu Watanabe
4e0a46f65e
util: introduce SOCKADDR_LEN() macro
2020-09-04 20:05:58 +09:00
Yu Watanabe
fc6021554b
test: add tests for in_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
23c5aeaac3
test: move several tests from test-socket-util.c
2020-09-04 20:05:58 +09:00
Yu Watanabe
c4fe658366
util: introduce in_addr_port_to_string()
2020-09-04 20:05:58 +09:00
Yu Watanabe
c364cefb3a
util: make in_addr_ifindex_to_string() an alias of in_addr_port_ifindex_name_to_string()
2020-09-04 20:05:58 +09:00
Yu Watanabe
355e884ded
util: introduce in_addr_port_from_string_auto()
2020-09-04 20:05:58 +09:00
Yu Watanabe
4650582657
resolve: stop extra stub listners before freeing information about them
2020-09-04 20:05:58 +09:00
Yu Watanabe
7314b39746
resolve: set DNS_STUB_LISTENER_YES if no protocol is specified in DNSStubListenExtra=
2020-09-04 20:05:58 +09:00
Yu Watanabe
dce65cd40f
resolve: Manager::dns_stub_listener_mode is not relevant to extra stub listeners
2020-09-04 20:05:58 +09:00
Yu Watanabe
88d2cb7c0e
resolve: make DnsStubListenerMode bitfield
2020-09-04 20:05:58 +09:00
Yu Watanabe
8ae07803a0
resolve: rename dns_stub_extra_event_source -> event_source
...
As the name is too redundant.
2020-09-04 20:05:58 +09:00
Yu Watanabe
6421194b31
man: update DNSStubListenerExtra=
2020-09-04 20:05:54 +09:00
Zbigniew Jędrzejewski-Szmek
459c41b9e2
Merge pull request #16881 from yuwata/network-routing-policy-rule-cleanups
...
network: routing policy rule cleanups
2020-09-04 12:57:20 +02:00
Zbigniew Jędrzejewski-Szmek
a36a23f52b
Merge pull request #16952 from yuwata/resolvectl-log-level-follow-ups
...
resolvectl: update help message
2020-09-04 12:21:15 +02:00
Yu Watanabe
aea4660af8
test: add tests for sd_bus_error_set_errnof()
2020-09-04 19:15:50 +09:00
Yu Watanabe
caf4ba83d5
sd-bus: use _cleanup_free_ macro in sd_bus_error_set_errnofv()
...
No functional change.
2020-09-04 19:15:45 +09:00
Yu Watanabe
2200c3cf56
network: fixes gateway assignment through DHCPv4
...
This fixes the following issue:
- If a DHCP lease does not contains router option, then routes with
`Gateway=_dhcp` setting introduce unexpected results.
This also makes several failure paths critical. And adjust warnings when
classless routes are provided.
2020-09-04 11:12:03 +02:00
Yu Watanabe
3605aae161
bash-completion: resolvectl: support 'log-level' command
2020-09-04 17:03:28 +09:00
Yu Watanabe
bde4bc9bd2
resolvectl: add 'log-level' to help message
...
Follow-up for df9578498f .
2020-09-04 16:58:36 +09:00
Lennart Poettering
5b49641015
resolved: ttl/hopcount sockopt is not a boolean
...
These are integer values, hence specify them as integers, not as
booleans.
2020-09-04 15:23:12 +09:00
Amitanand.Chikorde
c9f0e1ce5f
sd-bus: drop unnecessary free()
...
As `e->message` here is always NULL.
2020-09-04 12:23:29 +09:00
Yu Watanabe
ed89e54a49
man: mention that 'networkctl reconfigure' does not reload configs
2020-09-04 09:05:45 +09:00
Yu Watanabe
c45fdad66d
network: configure DHCP routes after DHCP address is ready
2020-09-04 09:05:45 +09:00
Yu Watanabe
687b3bc6f4
network: dhcp4: reset counter only when the lease address is new
2020-09-04 09:05:45 +09:00
Yu Watanabe
4dd6a3aad5
sd-ipv4acd: introduce sd_ipv4acd_get_address()
2020-09-04 09:05:45 +09:00
Yu Watanabe
5acf54a063
network: dhcp4: stop IPv4ACD before assigning new address
2020-09-04 09:05:34 +09:00
Yu Watanabe
6a776e3a18
sd-ipv4acd: do not call callback in sd_ipv4acd_stop() when it is already stopped
2020-09-04 09:04:43 +09:00
Yu Watanabe
dce1cd4188
network: voidify return value of sd_ipv4acd_stop()
2020-09-04 09:04:43 +09:00
Yu Watanabe
5c72a6d5d3
network: logs about unknown key
2020-09-04 08:48:08 +09:00
Yu Watanabe
f405179d65
network: honor already specified family when parsing from= or to= in serialized rule
2020-09-04 08:48:08 +09:00