Yu Watanabe
50550722e3
network: fix NDisc handling for the case when multiple routers exist
...
69203fba70
does not consider the case that
multiple routers exist, and causes #16719 .
Fixes #16719 .
2020-09-08 02:30:04 +09:00
Yu Watanabe
501b09dbf2
network: expose route_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
99a2878457
network: expose address_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Yu Watanabe
badd49288d
util: expose in6_addr_{hash,compare}_func()
2020-09-08 02:30:04 +09:00
Zbigniew Jędrzejewski-Szmek
6743a1caf4
Merge pull request #16928 from poettering/statx-fallback
...
stat-util: provide single statx() fallback on top of fstatat()
2020-09-05 22:04:18 +02:00
Christian Göttsche
e813a74ae8
selinux: create /run/user/${USERID}/systemd with default context
2020-09-05 21:39:44 +02:00
Christian Göttsche
1006038cf1
selinux: early exit in mac_selinux_maybe_reload if not initialized
...
Binaries might not initialize SELinux, e.g. when they normally do not
create files with the SELinux default context.
If they, via an internal libary function, call a _label() function,
mac_selinux_maybe_reload() gets called. Since the SELinux status page
has not been opened, selinux_status_updated() will fail with EINVAL.
This affects particularly test binaries.
Just exit early and avoid confusing debug logs.
2020-09-05 21:39:12 +02:00
George Rawlinson
22c2f841db
man: fix typo in resolved.conf
2020-09-05 21:38:01 +02:00
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