]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agosocket-proxy: allow localhost addresses 17066/head
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 12:52:47 +0000 (14:52 +0200)] 
socket-proxy: allow localhost addresses

With this change, only manager_connect() in timesync.d uses AI_ADDRCONFIG. There
we are connecting to a remove server, so the flag is appropriate.

3 years agosd-bus: allow localhost addresses
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 12:49:36 +0000 (14:49 +0200)] 
sd-bus: allow localhost addresses

By settings AI_ADDRCONFIG in hints we cannot for example resolve "localhost"
when the local machine only has a loopback interface. This seems like an
unnecessary restriction, drop it.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1839007.

3 years agosystemctl: give a nice hint about org.freedesktop.LogControl1 when applicable 16976/head
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 14:00:22 +0000 (16:00 +0200)] 
systemctl: give a nice hint about org.freedesktop.LogControl1 when applicable

3 years agosystemctl: immediately reject invalid log levels
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 13:42:23 +0000 (15:42 +0200)] 
systemctl: immediately reject invalid log levels

Symbolic names and number in the appropriate range are allowed
(log_level_from_string() DTRT already).

The target names are more messy, so we leave the verification to the service.

3 years agosystemctl: merge log_target(), log_level(), service_log_setting()
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 12:47:44 +0000 (14:47 +0200)] 
systemctl: merge log_target(), log_level(), service_log_setting()

3 years agosystemctl: add service-log-{level,target} verbs
Zbigniew Jędrzejewski-Szmek [Mon, 7 Sep 2020 19:25:24 +0000 (21:25 +0200)] 
systemctl: add service-log-{level,target} verbs

Heavily inspired by #15622. This adds:
  systemctl service-log-level systemd-resolved
  systemctl service-log-level systemd-resolved info
  systemctl service-log-target systemd-resolved
  systemctl service-log-target systemd-resolved console

We already have systemctl verbs log-level, log-target, and service-watchdogs.
Those two new verbs tie nicely into this scheme.

3 years agosystemctl: list unit introspection verbs first, modification second
Zbigniew Jędrzejewski-Szmek [Wed, 9 Sep 2020 09:19:38 +0000 (11:19 +0200)] 
systemctl: list unit introspection verbs first, modification second

The list was rather ad hoc, with "reset-failed" sandwiched between
"help" and "list-dependencies". Since a person will usually either want
to introspect state in various ways or modify state in a certain way, let's
put all the introspection commands together and all the ones that actually
have an effect second.

3 years agoMerge pull request #16973 from poettering/btrfs-dev-root
Lennart Poettering [Tue, 8 Sep 2020 17:55:12 +0000 (19:55 +0200)] 
Merge pull request #16973 from poettering/btrfs-dev-root

print friendly error message if btrfs tells us /dev/root was backing block device of root fs

3 years agoMerge pull request #16979 from keszybz/return-log-debug
Lennart Poettering [Tue, 8 Sep 2020 17:54:38 +0000 (19:54 +0200)] 
Merge pull request #16979 from keszybz/return-log-debug

Fix 'return log_error()' and 'return log_warning()' patterns

3 years agocgroup: freezer action must be NOP when cgroup v2 freezer is not available
Michal Sekletár [Tue, 8 Sep 2020 12:51:39 +0000 (14:51 +0200)] 
cgroup: freezer action must be NOP when cgroup v2 freezer is not available

Low-level cgroup freezer state manipulation is invoked directly from the
job engine when we are about to execute the job in order to make sure
the unit is not frozen and job execution is not blocked because of
that.

Currently with cgroup v1 we would needlessly do a bunch of work in the
function and even falsely update the freezer state. Don't do any of this
and skip the function silently when v2 freezer is not available.

Following bug is fixed by this commit,

$ systemd-run --unit foo.service /bin/sleep infinity
$ systemctl restart foo.service
$ systemctl show -p FreezerState foo.service

Before (cgroup v1, i.e. full "legacy" mode):
FreezerState=thawing

After:
FreezerState=running

3 years agoMerge pull request #16955 from keszybz/test-execute-cleanup
Lennart Poettering [Tue, 8 Sep 2020 16:33:12 +0000 (18:33 +0200)] 
Merge pull request #16955 from keszybz/test-execute-cleanup

One patch for test-execute and assorted cleanups

3 years agotree-wide: if get_block_device() returns zero devno, check for it in all cases 16973/head
Lennart Poettering [Mon, 7 Sep 2020 17:01:41 +0000 (19:01 +0200)] 
tree-wide: if get_block_device() returns zero devno, check for it in all cases

And add a comment for the existing cases where things aren't clear
already.

3 years agobtrfs: if BTRFS_IOC_DEV_INFO returns /dev/root generate a friendly error message
Lennart Poettering [Mon, 7 Sep 2020 16:50:41 +0000 (18:50 +0200)] 
btrfs: if BTRFS_IOC_DEV_INFO returns /dev/root generate a friendly error message

On systems that boot without initrd on a btrfs root file systems the
BTRFS_IOC_DEV_INFO ioctl returns /dev/root as backing device. That
sucks, since that is not a real device visible to userspace.

Since this has been that way since forever, and it doesn't look like the
kernel will get fixed soon for this, let's at least generate a useful
error message in this case.

This is not a bug fix, just a tweak to make this more recognizable.

Once the kernel gets fixed to report the correct device nodes in this
case, in a way userspace can make sense of them things will magically
work for systemd, too.

(Note that this doesn't add a log message about this to really all cases
we call get_device() in, but just the main ones that are called in early
boot context, after all all there's no benefit in seeing this message
too many times.)

https://github.com/systemd/systemd/issues/16953
https://bugs.freedesktop.org/show_bug.cgi?id=84689
https://bugzilla.kernel.org/show_bug.cgi?id=89721

3 years agosleep: reword some debug messages 16979/head
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 11:19:53 +0000 (13:19 +0200)] 
sleep: reword some debug messages

I think the sentences sound more natural this way.

3 years agobasic/log: make log_{info,warning,...} return void
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 11:18:25 +0000 (13:18 +0200)] 
basic/log: make log_{info,warning,...} return void

log_debug still returns 0. I think it is legitimate to use 'return log_debug()' to
return 0. It is different than the other functions, since we often want to supress
errors logged at debug level. This case is quite common in the codebase and
we could use 'return log_debug_errno()' to make the code more consise.

For all other variants, a separate return line is required.
Previous commit changes all the non-conforming instances, now we can make it mandatory.

3 years agotree-wide: correct cases where return log_{error,warning} is used without value
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 10:51:23 +0000 (12:51 +0200)] 
tree-wide: correct cases where return log_{error,warning} is used without value

In various cases, we would say 'return log_warning()' or 'return log_error()'. Those
functions return 0 if no error is passed in. For log_warning or log_error this doesn't
make sense, and we generally want to propagate the error. In the few cases where
the error should be ignored, I think it's better to split it in two, and call 'return 0'
on a separate line.

3 years agoman: fix quickhelp listing in sysusers.d(5)
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 20:09:02 +0000 (22:09 +0200)] 
man: fix quickhelp listing in sysusers.d(5)

Fixes #16958.

3 years agoMerge pull request #16978 from keszybz/two-variable-reduction-patches
Lennart Poettering [Tue, 8 Sep 2020 15:13:21 +0000 (17:13 +0200)] 
Merge pull request #16978 from keszybz/two-variable-reduction-patches

Two variable reduction patches

3 years agoMerge pull request #16618 from yuwata/network-ipv6token-prefixstable
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 11:36:27 +0000 (13:36 +0200)] 
Merge pull request #16618 from yuwata/network-ipv6token-prefixstable

network: make prefixstable mode of IPv6Token= can be applied any received prefixes

3 years agotree-wide: define iterator inside of the macro 16978/head
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 09:58:29 +0000 (11:58 +0200)] 
tree-wide: define iterator inside of the macro

3 years agocore/unit: reduce scope of variables
Zbigniew Jędrzejewski-Szmek [Tue, 1 Sep 2020 17:09:24 +0000 (19:09 +0200)] 
core/unit: reduce scope of variables

3 years agoMerge pull request #16725 from yuwata/network-fix-ndisc-multiple-routers
Zbigniew Jędrzejewski-Szmek [Tue, 8 Sep 2020 06:16:33 +0000 (08:16 +0200)] 
Merge pull request #16725 from yuwata/network-fix-ndisc-multiple-routers

network: fix NDisc behavior when multiple routers exist

3 years agocore: introduce support for setting NUMAMask= to special "all" value
Michal Sekletár [Tue, 1 Sep 2020 10:12:32 +0000 (12:12 +0200)] 
core: introduce support for setting NUMAMask= to special "all" value

Fixes #14113

3 years agotest-network: add test for IPv6Token=prefixstable 16618/head
Yu Watanabe [Thu, 30 Jul 2020 03:38:17 +0000 (12:38 +0900)] 
test-network: add test for IPv6Token=prefixstable

3 years agonetwork: make prefixstable mode of IPv6Token= can be applied to any received prefixes
Yu Watanabe [Thu, 30 Jul 2020 03:12:23 +0000 (12:12 +0900)] 
network: make prefixstable mode of IPv6Token= can be applied to any received prefixes

Closes #4625.

3 years agonetwork: fix NDisc handling for the case when multiple routers exist 16725/head
Yu Watanabe [Fri, 14 Aug 2020 08:45:44 +0000 (17:45 +0900)] 
network: fix NDisc handling for the case when multiple routers exist

69203fba700ea8d7b0c4f4e3d1e1f809ac4644a1 does not consider the case that
multiple routers exist, and causes #16719.

Fixes #16719.

3 years agonetwork: expose route_{hash,compare}_func()
Yu Watanabe [Fri, 4 Sep 2020 01:56:03 +0000 (10:56 +0900)] 
network: expose route_{hash,compare}_func()

3 years agonetwork: expose address_{hash,compare}_func()
Yu Watanabe [Fri, 4 Sep 2020 01:55:40 +0000 (10:55 +0900)] 
network: expose address_{hash,compare}_func()

3 years agoutil: expose in6_addr_{hash,compare}_func()
Yu Watanabe [Fri, 14 Aug 2020 08:44:02 +0000 (17:44 +0900)] 
util: expose in6_addr_{hash,compare}_func()

3 years agoMerge pull request #16928 from poettering/statx-fallback
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 20:04:18 +0000 (22:04 +0200)] 
Merge pull request #16928 from poettering/statx-fallback

stat-util: provide single statx() fallback on top of fstatat()

3 years agoselinux: create /run/user/${USERID}/systemd with default context
Christian Göttsche [Sat, 5 Sep 2020 15:42:56 +0000 (17:42 +0200)] 
selinux: create /run/user/${USERID}/systemd with default context

3 years agoselinux: early exit in mac_selinux_maybe_reload if not initialized
Christian Göttsche [Sat, 5 Sep 2020 15:49:48 +0000 (17:49 +0200)] 
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.

3 years agoman: fix typo in resolved.conf
George Rawlinson [Sat, 5 Sep 2020 17:57:00 +0000 (05:57 +1200)] 
man: fix typo in resolved.conf

3 years agoMerge pull request #16951 from yuwata/resolve-follow-ups-for-extra-dns-stub-listener
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 13:55:22 +0000 (15:55 +0200)] 
Merge pull request #16951 from yuwata/resolve-follow-ups-for-extra-dns-stub-listener

resolve: follow-ups for extra DNS stub listener

3 years agoMerge pull request #16854 from yuwata/sd-bus-error-set-errnofv
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 13:47:37 +0000 (15:47 +0200)] 
Merge pull request #16854 from yuwata/sd-bus-error-set-errnofv

sd-bus: rework sd_bus_error_set_errnofv()

3 years agoMerge pull request #16957 from poettering/sd-bus-proto-def-move
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 10:06:15 +0000 (12:06 +0200)] 
Merge pull request #16957 from poettering/sd-bus-proto-def-move

three unrelated, minor fixes

3 years agovarlink: properly allocate connection event source 16957/head
Lennart Poettering [Fri, 4 Sep 2020 21:54:11 +0000 (23:54 +0200)] 
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.)

3 years agoptyfwd: don't set prio if event source that might not exist
Lennart Poettering [Fri, 4 Sep 2020 21:52:39 +0000 (23:52 +0200)] 
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.

3 years agosd-bus: move SD_BUS_MAXIMUM_(SIGNATURE|NAME)_LENGTH to sd-bus-protocol.h
Lennart Poettering [Fri, 4 Sep 2020 21:49:44 +0000 (23:49 +0200)] 
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.

3 years agotest-sizeof: print pointer sizes 16955/head
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 16:32:43 +0000 (18:32 +0200)] 
test-sizeof: print pointer sizes

This is useful information, I don't know why we forgot to add it there.

gcc doesn't like arithemetic on a pointer to a function or void*, so don't
print signedness info there. It doesn't matter anyway.
C says function pointers can be different... Though I guess our code isn't
prepared for that.

3 years agoudev-test: do not rely on "mail" group being defined
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 16:09:20 +0000 (18:09 +0200)] 
udev-test: do not rely on "mail" group being defined

"audio" should be there, at least we declare it. "mail" nowadays is less
likely to exist than in the past.

Fixes one of the items in #16942.

3 years agotest-execute: check if private directories have bad permissions before running test_e...
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 16:02:57 +0000 (18:02 +0200)] 
test-execute: check if private directories have bad permissions before running test_exec_dynamicuser()

If the directory (/var/lib/private is most likely) has borked permissions, the
test will fail with a cryptic message and EXIT_STATE_DIRECTORY or similar. The
message from the child with more details gets lost somewhere. Let's avoid running
the test in that case and provide a simple error message instead.

E.g. systemd-238-12.git07f8cd5.fc28.ppc64 (which I encountered on a test machine)
has /var/lib/private with 0755.

3 years agocore/manager: reindent table for readability
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 15:34:11 +0000 (17:34 +0200)] 
core/manager: reindent table for readability

3 years agocore/{execute, manager}: reduce scope of iterator variables a bit
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 15:28:53 +0000 (17:28 +0200)] 
core/{execute, manager}: reduce scope of iterator variables a bit

3 years agotest-execute/exec-dynamicuser-statedir.service: fix quoting
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 14:12:40 +0000 (16:12 +0200)] 
test-execute/exec-dynamicuser-statedir.service: fix quoting

All backslashes that should be single in shell syntax need to be written as "\\" because
our parser will remove one level of quoting. Also, single quotes were doubly nested, which
cannot work.

Should fix the following message:
test-execute/exec-dynamicuser-statedir.service:16: Ignoring unknown escape sequences: "test $$(find / \( -path /var/tmp -o -path /tmp -o -path /proc -o -path /dev/mqueue -o -path /dev/shm -o -path /sys/fs/bpf -o -path /dev/.lxc \) -prune -o -type d -writable -print 2>/dev/null | sort -u | tr -d \\n) = /var/lib/private/quux/pief/var/lib/private/waldo"

3 years agotest-execute: simplify condition
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 14:06:07 +0000 (16:06 +0200)] 
test-execute: simplify condition

tests is always a static array, it cannot be NULL.

3 years agocore: add [Enable|Disable]UnitFilesWithFlags DBUS methods
Luca Boccassi [Tue, 1 Sep 2020 16:08:29 +0000 (17:08 +0100)] 
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.

3 years agoutil: constify the second argument of set_get()
Yu Watanabe [Fri, 4 Sep 2020 14:17:49 +0000 (23:17 +0900)] 
util: constify the second argument of set_get()

3 years agoresolve: use correct fd for UDP stub listner 16951/head
Yu Watanabe [Fri, 4 Sep 2020 14:08:48 +0000 (23:08 +0900)] 
resolve: use correct fd for UDP stub listner

3 years agoresolve: do not check sender and destination for packet received by extra DNS stub...
Yu Watanabe [Fri, 4 Sep 2020 12:30:37 +0000 (21:30 +0900)] 
resolve: do not check sender and destination for packet received by extra DNS stub listner

3 years agoresolve: use sd_event_source_set_io_fd_own() for stub listners
Yu Watanabe [Fri, 4 Sep 2020 11:52:46 +0000 (20:52 +0900)] 
resolve: use sd_event_source_set_io_fd_own() for stub listners

3 years agoresolve: introduce dns_stub_listener_extra_free() and set it as a key destructor
Yu Watanabe [Fri, 4 Sep 2020 07:41:13 +0000 (16:41 +0900)] 
resolve: introduce dns_stub_listener_extra_free() and set it as a key destructor

3 years agoresolve: adjust error messages
Yu Watanabe [Fri, 4 Sep 2020 07:26:17 +0000 (16:26 +0900)] 
resolve: adjust error messages

3 years agoresolve: do not set IPv4 specific options on IPv6 socket
Yu Watanabe [Fri, 4 Sep 2020 06:22:36 +0000 (15:22 +0900)] 
resolve: do not set IPv4 specific options on IPv6 socket

3 years agoresolve: do not set IP_TTL for extra DNS stub listeners
Yu Watanabe [Fri, 4 Sep 2020 06:10:48 +0000 (15:10 +0900)] 
resolve: do not set IP_TTL for extra DNS stub listeners

3 years agomissing: add IPV6_FREEBIND
Yu Watanabe [Fri, 4 Sep 2020 14:53:18 +0000 (23:53 +0900)] 
missing: add IPV6_FREEBIND

3 years agoMerge pull request #16880 from yuwata/network-dhcp4-cleanups
Lennart Poettering [Fri, 4 Sep 2020 13:54:27 +0000 (15:54 +0200)] 
Merge pull request #16880 from yuwata/network-dhcp4-cleanups

network: DHCPv4 cleanups

3 years agoutil: drop unused socket_addr_port_from_string_auto()
Yu Watanabe [Fri, 4 Sep 2020 06:27:53 +0000 (15:27 +0900)] 
util: drop unused socket_addr_port_from_string_auto()

3 years agoresolve: use in_addr_union to store addresses for extra dns stub listeners
Yu Watanabe [Fri, 4 Sep 2020 06:01:21 +0000 (15:01 +0900)] 
resolve: use in_addr_union to store addresses for extra dns stub listeners

3 years agoresolve: fix indentation
Yu Watanabe [Fri, 4 Sep 2020 05:54:03 +0000 (14:54 +0900)] 
resolve: fix indentation

3 years agoutil: introduce SOCKADDR_LEN() macro
Yu Watanabe [Fri, 4 Sep 2020 10:37:50 +0000 (19:37 +0900)] 
util: introduce SOCKADDR_LEN() macro

3 years agotest: add tests for in_addr_port_from_string_auto()
Yu Watanabe [Fri, 4 Sep 2020 06:42:09 +0000 (15:42 +0900)] 
test: add tests for in_addr_port_from_string_auto()

3 years agotest: move several tests from test-socket-util.c
Yu Watanabe [Fri, 4 Sep 2020 06:53:50 +0000 (15:53 +0900)] 
test: move several tests from test-socket-util.c

3 years agoutil: introduce in_addr_port_to_string()
Yu Watanabe [Fri, 4 Sep 2020 07:15:29 +0000 (16:15 +0900)] 
util: introduce in_addr_port_to_string()

3 years agoutil: make in_addr_ifindex_to_string() an alias of in_addr_port_ifindex_name_to_string()
Yu Watanabe [Fri, 4 Sep 2020 07:14:14 +0000 (16:14 +0900)] 
util: make in_addr_ifindex_to_string() an alias of in_addr_port_ifindex_name_to_string()

3 years agoutil: introduce in_addr_port_from_string_auto()
Yu Watanabe [Fri, 4 Sep 2020 04:40:31 +0000 (13:40 +0900)] 
util: introduce in_addr_port_from_string_auto()

3 years agoresolve: stop extra stub listners before freeing information about them
Yu Watanabe [Fri, 4 Sep 2020 05:29:06 +0000 (14:29 +0900)] 
resolve: stop extra stub listners before freeing information about them

3 years agoresolve: set DNS_STUB_LISTENER_YES if no protocol is specified in DNSStubListenExtra=
Yu Watanabe [Fri, 4 Sep 2020 04:23:39 +0000 (13:23 +0900)] 
resolve: set DNS_STUB_LISTENER_YES if no protocol is specified in DNSStubListenExtra=

3 years agoresolve: Manager::dns_stub_listener_mode is not relevant to extra stub listeners
Yu Watanabe [Fri, 4 Sep 2020 04:21:55 +0000 (13:21 +0900)] 
resolve: Manager::dns_stub_listener_mode is not relevant to extra stub listeners

3 years agoresolve: make DnsStubListenerMode bitfield
Yu Watanabe [Fri, 4 Sep 2020 04:09:02 +0000 (13:09 +0900)] 
resolve: make DnsStubListenerMode bitfield

3 years agoresolve: rename dns_stub_extra_event_source -> event_source
Yu Watanabe [Fri, 4 Sep 2020 04:01:15 +0000 (13:01 +0900)] 
resolve: rename dns_stub_extra_event_source -> event_source

As the name is too redundant.

3 years agoman: update DNSStubListenerExtra=
Yu Watanabe [Fri, 4 Sep 2020 03:58:32 +0000 (12:58 +0900)] 
man: update DNSStubListenerExtra=

3 years agoMerge pull request #16881 from yuwata/network-routing-policy-rule-cleanups
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 10:57:20 +0000 (12:57 +0200)] 
Merge pull request #16881 from yuwata/network-routing-policy-rule-cleanups

network: routing policy rule cleanups

3 years agoMerge pull request #16952 from yuwata/resolvectl-log-level-follow-ups
Zbigniew Jędrzejewski-Szmek [Fri, 4 Sep 2020 10:21:15 +0000 (12:21 +0200)] 
Merge pull request #16952 from yuwata/resolvectl-log-level-follow-ups

resolvectl: update help message

3 years agotest: add tests for sd_bus_error_set_errnof() 16854/head
Yu Watanabe [Fri, 4 Sep 2020 03:17:22 +0000 (12:17 +0900)] 
test: add tests for sd_bus_error_set_errnof()

3 years agosd-bus: use _cleanup_free_ macro in sd_bus_error_set_errnofv()
Yu Watanabe [Fri, 4 Sep 2020 03:02:46 +0000 (12:02 +0900)] 
sd-bus: use _cleanup_free_ macro in sd_bus_error_set_errnofv()

No functional change.

3 years agonetwork: fixes gateway assignment through DHCPv4
Yu Watanabe [Wed, 26 Aug 2020 13:31:01 +0000 (22:31 +0900)] 
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.

3 years agobash-completion: resolvectl: support 'log-level' command 16952/head
Yu Watanabe [Fri, 4 Sep 2020 08:03:28 +0000 (17:03 +0900)] 
bash-completion: resolvectl: support 'log-level' command

3 years agoresolvectl: add 'log-level' to help message
Yu Watanabe [Fri, 4 Sep 2020 07:58:32 +0000 (16:58 +0900)] 
resolvectl: add 'log-level' to help message

Follow-up for df9578498f3f566409fcb71229d9fc99e4ab0568.

3 years agoresolved: ttl/hopcount sockopt is not a boolean
Lennart Poettering [Thu, 3 Sep 2020 21:52:27 +0000 (23:52 +0200)] 
resolved: ttl/hopcount sockopt is not a boolean

These are integer values, hence specify them as integers, not as
booleans.

3 years agosd-bus: drop unnecessary free()
Amitanand.Chikorde [Wed, 26 Aug 2020 10:01:49 +0000 (15:31 +0530)] 
sd-bus: drop unnecessary free()

As `e->message` here is always NULL.

3 years agoman: mention that 'networkctl reconfigure' does not reload configs 16880/head
Yu Watanabe [Fri, 28 Aug 2020 04:58:00 +0000 (13:58 +0900)] 
man: mention that 'networkctl reconfigure' does not reload configs

3 years agonetwork: configure DHCP routes after DHCP address is ready
Yu Watanabe [Fri, 28 Aug 2020 04:45:42 +0000 (13:45 +0900)] 
network: configure DHCP routes after DHCP address is ready

3 years agonetwork: dhcp4: reset counter only when the lease address is new
Yu Watanabe [Thu, 27 Aug 2020 21:54:11 +0000 (06:54 +0900)] 
network: dhcp4: reset counter only when the lease address is new

3 years agosd-ipv4acd: introduce sd_ipv4acd_get_address()
Yu Watanabe [Thu, 27 Aug 2020 21:56:33 +0000 (06:56 +0900)] 
sd-ipv4acd: introduce sd_ipv4acd_get_address()

3 years agonetwork: dhcp4: stop IPv4ACD before assigning new address
Yu Watanabe [Thu, 27 Aug 2020 21:38:43 +0000 (06:38 +0900)] 
network: dhcp4: stop IPv4ACD before assigning new address

3 years agosd-ipv4acd: do not call callback in sd_ipv4acd_stop() when it is already stopped
Yu Watanabe [Fri, 4 Sep 2020 00:01:03 +0000 (09:01 +0900)] 
sd-ipv4acd: do not call callback in sd_ipv4acd_stop() when it is already stopped

3 years agonetwork: voidify return value of sd_ipv4acd_stop()
Yu Watanabe [Thu, 3 Sep 2020 23:54:21 +0000 (08:54 +0900)] 
network: voidify return value of sd_ipv4acd_stop()

3 years agonetwork: logs about unknown key 16881/head
Yu Watanabe [Fri, 28 Aug 2020 04:00:25 +0000 (13:00 +0900)] 
network: logs about unknown key

3 years agonetwork: honor already specified family when parsing from= or to= in serialized rule
Yu Watanabe [Fri, 28 Aug 2020 03:58:49 +0000 (12:58 +0900)] 
network: honor already specified family when parsing from= or to= in serialized rule

3 years agonetwork: do not reallocate buffer
Yu Watanabe [Fri, 28 Aug 2020 03:53:08 +0000 (12:53 +0900)] 
network: do not reallocate buffer

3 years agonetwork: serialize InvertRule= in [RoutingPolicyRule]
Yu Watanabe [Fri, 28 Aug 2020 03:47:44 +0000 (12:47 +0900)] 
network: serialize InvertRule= in [RoutingPolicyRule]

3 years agonetwork: add whitespace after family= and priority= in serialized routing policy...
Yu Watanabe [Fri, 28 Aug 2020 03:34:36 +0000 (12:34 +0900)] 
network: add whitespace after family= and priority= in serialized routing policy rule

This also makes priority= serialized only when its value is non-zero.

3 years agonetwork: downgrade error level when the error is ignored
Yu Watanabe [Thu, 3 Sep 2020 23:44:14 +0000 (08:44 +0900)] 
network: downgrade error level when the error is ignored

3 years agonetwork: move routing_policy_rule_read_full_file()
Yu Watanabe [Fri, 28 Aug 2020 03:27:32 +0000 (12:27 +0900)] 
network: move routing_policy_rule_read_full_file()

3 years agoMerge pull request #16044 from ssahani/resolved-interface
Zbigniew Jędrzejewski-Szmek [Thu, 3 Sep 2020 17:06:05 +0000 (19:06 +0200)] 
Merge pull request #16044 from ssahani/resolved-interface

systemd-resolved: allow configurable bind address

3 years agoMerge pull request #16945 from poettering/udev-test-selinux
Lennart Poettering [Thu, 3 Sep 2020 16:39:28 +0000 (18:39 +0200)] 
Merge pull request #16945 from poettering/udev-test-selinux

fix udev-test when used with selinux

3 years agoudev-test: don't mix alloca() and regular C stack allocation in one expression 16945/head
Lennart Poettering [Thu, 3 Sep 2020 14:56:47 +0000 (16:56 +0200)] 
udev-test: don't mix alloca() and regular C stack allocation in one expression

3 years agoudev-test: use SYNTHETIC_ERRNO() where useful
Lennart Poettering [Thu, 3 Sep 2020 14:56:30 +0000 (16:56 +0200)] 
udev-test: use SYNTHETIC_ERRNO() where useful

3 years agoudev-test: use mount_verbose() instead of mount(), to make debugging easier
Lennart Poettering [Thu, 3 Sep 2020 14:56:07 +0000 (16:56 +0200)] 
udev-test: use mount_verbose() instead of mount(), to make debugging easier