Yu Watanabe
ebd04379cd
udev: drop license boilerplate
2020-12-16 02:31:44 +09:00
Yu Watanabe
90ac73eb1b
rules: drop broken links
2020-12-16 02:31:44 +09:00
Yu Watanabe
e4b127e2cc
meson: do not link with libudev
2020-12-16 02:31:44 +09:00
Yu Watanabe
1403fe26d6
udev: drop unnecessary libudev-util.h inclusions
2020-12-16 02:31:44 +09:00
Yu Watanabe
b653abbb1a
udevadm: drop udev_queue
2020-12-16 02:31:30 +09:00
Yu Watanabe
bee33d0527
udev: introduce udev_queue_is_empty() and udev_queue_init()
2020-12-16 02:28:08 +09:00
Yu Watanabe
0746a5ee4c
libudev: fix indentation
2020-12-16 02:23:13 +09:00
Yu Watanabe
dae28211b7
libudev: drop unnecessary headers from libudev-util.c
2020-12-16 02:23:13 +09:00
Yu Watanabe
2b0f5113b4
udev: use encode_devnode_name() instead of udev_util_encode_string()
...
As udev_util_encode_string() is a simple wrapper of
encode_devnode_name().
2020-12-16 02:23:13 +09:00
Yu Watanabe
c8eaaf69ac
udev: rename UTIL_LINE_SIZE -> UDEV_LINE_SIZE and friends
...
This also moves them to udev-util.h
2020-12-16 02:22:58 +09:00
Yu Watanabe
1223227f95
udev: move util_resolve_subsys_kernel() to udev-util.c
2020-12-16 02:14:47 +09:00
Yu Watanabe
393fcaf733
udev: move util_replace_chars() to udev-util.c
2020-12-16 02:14:47 +09:00
Yu Watanabe
9a56b87717
udev: move util_path_encode() and rename it to escape_path()
2020-12-16 02:14:47 +09:00
Yu Watanabe
5953d8b910
udev: move util_replace_whitespace() to udev-util.c
2020-12-16 02:14:47 +09:00
Yu Watanabe
bcdb3b7d50
core: detect_container() may return negative errno
2020-12-14 19:35:11 +01:00
Yu Watanabe
c4837f4567
Revert "core/namespace: ignore ENOENT for /proc/sys/kernel/domainname and hostname"
...
This reverts commit 0ebc9f23fa .
With the previous commit, these files should always exist.
Closes #17979 .
2020-12-15 02:38:35 +09:00
Yu Watanabe
ad74f28a13
core/namespace: do not ignore non-EPERM mount error
...
Follow-up for 61f8a7bd3e .
2020-12-15 02:37:03 +09:00
Yu Watanabe
23d8003bb6
time-util: fix typo
2020-12-14 17:56:01 +01:00
Yu Watanabe
61f8a7bd3e
core/namespace: use existing /proc when not enough priviledge
...
Fixes #17860 .
2020-12-14 16:12:43 +01:00
Yu Watanabe
c18c53c36e
network: use netlink_message_read_in_addr_union() where applicable
2020-12-14 23:32:25 +09:00
Yu Watanabe
ea81208f03
network: introduce log_routing_policy_rule_debug()
2020-12-14 23:32:20 +09:00
Yu Watanabe
40424f1ad9
network: introduce routing_policy_rule_equal()
2020-12-14 23:30:16 +09:00
Yu Watanabe
18f2ee3310
network: make routing_policy_rule_remove() take Manager instead of Link
...
As routing policy rules are managed by Manager.
2020-12-14 23:30:16 +09:00
Yu Watanabe
1db01a3339
network: make address_drop() accept NULL
2020-12-14 23:28:11 +09:00
Yu Watanabe
24f50382af
network: introduce log_address_debug()
2020-12-14 23:28:07 +09:00
Yu Watanabe
4055ec9323
network: merge manager_drop_routes() and manager_drop_foreign_routes()
2020-12-14 23:26:49 +09:00
Yu Watanabe
167a5561cd
network: introduce log_route_debug()
2020-12-14 23:26:45 +09:00
Yu Watanabe
ad6df71759
network: use netlink_message_read_in_addr_union() where applicable
2020-12-14 23:25:09 +09:00
Yu Watanabe
0ebc9f23fa
core/namespace: ignore ENOENT for /proc/sys/kernel/domainname and hostname
...
If they do not exist, hostname or domainname cannot be modified. So, it is ok.
Fixes #17866 , especially https://github.com/systemd/systemd/issues/17866#issuecomment-744118614 .
2020-12-14 14:15:28 +00:00
Yu Watanabe
28423d9a75
tree-wide: fix typo
2020-12-14 12:05:55 +00:00
Yu Watanabe
8d80f27530
sd-device: make TAGS= property prefixed and suffixed with ":"
...
The commit 6f3ac0d517 drops the prefix and
suffix in TAGS= property. But there exists several rules that have like
`TAGS=="*:tag:*"`. So, the property must be always prefixed and suffixed
with ":".
Fixes #17930 .
2020-12-14 14:04:53 +09:00
Yu Watanabe
ba9385d91f
Merge pull request #17928 from keszybz/nss-logging
...
Enable logging in nss modules
2020-12-14 09:48:23 +09:00
Yu Watanabe
bd4733da64
network: do not configure static configs more than once simultaneously
2020-12-11 14:39:46 +09:00
Yu Watanabe
b788a429d1
network: do not assume address ready callback is always set to static addresses
2020-12-11 14:22:35 +09:00
Yu Watanabe
b2219cc4b6
network: drop assertions to check link state in netlink callback handlers
...
As, the link may be dropped while configuring addresses or routes.
Fixes #17920 .
2020-12-11 13:47:24 +09:00
Yu Watanabe
8bceafa777
network: do not reconfigure interface when the link gains carrier but udev not initialized it yet
...
When an interface gains carrier but udev have not initialized the
interface or link_initialized_handler() has not been called yet,
then link_configure will be called twice. Thus LLDP client will be
configured twice, and triggers assertion.
Fixes #17929 .
2020-12-11 12:27:27 +09:00
Yu Watanabe
44cc6bfef0
Merge pull request #17877 from yuwata/missing-syscall-sort
...
missing: sort architectures in missing_syscall.h
2020-12-10 12:42:35 +09:00
Yu Watanabe
563a94d080
man: mention new OPTIONS=log_level= udev rule
2020-12-10 12:33:34 +09:00
Yu Watanabe
1a0bd01529
udev: introduce new OPTIONS="log_level=" udev rule
2020-12-10 12:31:45 +09:00
Yu Watanabe
b2d9e58f78
udev: introduce log_device_uevent() helper function
...
And this drops duplicated check for seqnum and device action.
2020-12-10 12:26:19 +09:00
Yu Watanabe
481f24d1f6
udev: drop meaningless size optimization
...
These objects are not allocated multiple times simultaneously per
single process.
2020-12-10 12:18:30 +09:00
Yu Watanabe
13ee939784
log: open journal when cli program run in a service unit
...
Previously, cli programs like networkctl always use console for logging.
2020-12-09 14:44:02 +09:00
Yu Watanabe
db987463fe
log: make show_color variable tristate
...
Should not change any behavior.
2020-12-09 14:44:02 +09:00
Yu Watanabe
5941112e7e
log: merge conditions to reduce indentation
2020-12-09 14:44:02 +09:00
Yu Watanabe
9e36b885b8
unit: make systemd-networkd.service support reload command
2020-12-09 12:55:51 +09:00
Yu Watanabe
84f9a68060
mount-util: fix typo
2020-12-09 12:55:14 +09:00
Yu Watanabe
78bc702503
man: synthetize(d) -> synthesize(d)
2020-12-08 09:24:11 +01:00
Yu Watanabe
105bfc9e72
missing: update warning messages
2020-12-08 15:35:57 +09:00
Yu Watanabe
6451baba82
missing: add missing syscalls for ia64, m68k, sparc, arc, and tilegx
...
These are not tested, but several syscalls are defined for these
architectures. Let's add syscalls comprehensively.
2020-12-08 15:32:25 +09:00
Yu Watanabe
ae32a94efe
missing: drop redundant condition
2020-12-08 14:54:20 +09:00
Yu Watanabe
86b8637435
missing: support 32bit powerpc
2020-12-08 14:51:58 +09:00
Yu Watanabe
b8bcd4c69f
missing: sort architectures in missing_syscall.h
2020-12-08 14:50:23 +09:00
Yu Watanabe
b432080dc8
network: warn when NDISC and DHCPv6 provide the same address
...
With some router, the address in NDISC generated with EUI-64 conflicts
with an address provided by DHCPv6.
Prompted by #17831 .
2020-12-08 13:36:19 +09:00
Yu Watanabe
450fa34bd0
network: fix SIGABRT related to unreachable route with DHCP6
...
After #17834 , unreachable routes generated through DHCP6 are managed by
Manager. But they are referrenced by the DHCP6 uplink. So, the routes
managed by Manager must be freed after all Link objects are freed.
Follow-up for 575f14eef0 .
Fixes SIGABRT reproted in #17831 .
2020-12-08 12:41:07 +09:00
Yu Watanabe
c5a0aeb33a
network: use address_get() in address_exists()
...
And rename address_exists() to link_has_ipv6_address().
2020-12-08 12:41:07 +09:00
Yu Watanabe
1d30fc5cb6
network: revert previous changes to address_compare_func()
...
This partially reverts fe841414ef and
2a236f9fc0 .
For IPv4, kernel compares the local address, prefix, and prefixlen.
For IPv6, kernel compares only the local address.
Let's follow the kernel's comparison way.
Fixes #17831 .
2020-12-08 12:41:07 +09:00
Yu Watanabe
e6f8828715
test: add tests for device_new_from_nulstr()
2020-12-08 12:35:51 +09:00
Yu Watanabe
31063db0b4
sd-device: keep escaped strings in DEVLINK= property
...
This fixes a bug introduced by 87a4d416e5 .
Fixes #17772 .
2020-12-08 12:35:47 +09:00
Yu Watanabe
6f3ac0d517
sd-device: use set_strjoin()
...
This slightly changes TAGS= and CURRENT_TAGS= properties:
Before
E: TAGS=:aaa:bbb:
After
E: TAGS=aaa:bbb
2020-12-08 12:28:58 +09:00
Yu Watanabe
4dbce71787
set: introduce set_strjoin()
2020-12-08 12:28:54 +09:00
Yu Watanabe
3c229a9afb
nss-resolve: varlink_call() set error_id only when r >= 0
...
Fixes #17870 .
2020-12-07 09:25:39 +01:00
Yu Watanabe
a7b6e29c1f
network: mtu is neither a boolean nor a pointer
2020-12-07 08:59:21 +01:00
Yu Watanabe
402506cea5
socket-util: make several socket_set_xxx() functions inline
2020-12-04 17:49:55 +01:00
Yu Watanabe
452d86a532
test-network: add tests for IPv6 routes with reject type
2020-12-04 16:50:35 +09:00
Yu Watanabe
37b9c79e5d
test-network: sleep 1s after reloading configs
...
As interfaces will be reconfigured asynchronously after `networkctl reload`.
So, right after `networkctl reload` is finished, interfaces may be still
in 'configured' state with the old .network files.
2020-12-04 11:28:52 +09:00
Yu Watanabe
d9d6a10bce
network: set protocol to route assigned through DHCP6 or DHCP6-PD
2020-12-04 11:23:23 +09:00
Yu Watanabe
575f14eef0
network: make IPv6 routes with reject type managed by Manager
2020-12-04 11:23:23 +09:00
Yu Watanabe
6c252588df
network: introduce route_type_is_reject() helper
2020-12-04 11:23:23 +09:00
Yu Watanabe
62e3a988f2
Merge pull request #17821 from poettering/local-address-fix
...
fix ipv4/ipv6 NXDOMAIN/NODATA confusion for synthesized local addresses
2020-12-04 11:03:35 +09:00
Yu Watanabe
131e4deaf3
ethtool: add two new link modes
2020-12-03 11:23:50 +09:00
Yu Watanabe
89836c304b
shared/kernel: update kernel headers
...
From kernel commit 34816d20f173a90389c8a7e641166d8ea9dce70a.
2020-12-03 11:21:13 +09:00
Yu Watanabe
8c47d1103f
basic/linux: update kernel headers
...
From kernel commit 34816d20f173a90389c8a7e641166d8ea9dce70a.
2020-12-03 11:20:59 +09:00
Yu Watanabe
2a236f9fc0
network: ignore broadcast address for /31 or /32 addresses
...
As they do not have broadcast address.
See https://tools.ietf.org/html/rfc3021
2020-12-03 10:23:12 +09:00
Yu Watanabe
05a7023d24
network: fix verification for broadcast address
...
Fixes a bug caused by fe841414ef .
2020-12-03 10:23:12 +09:00
Yu Watanabe
df8aa08642
network: do not set broadcast if prefixlen is 31 or 32
...
After fe841414ef , broadcast address is
also compared with existing one to determine whether the address is
foregin or not. So, the address object should not contain unnecessary
information.
Fixes #17803 .
2020-12-03 10:22:50 +09:00
Yu Watanabe
34f80876f8
Merge pull request #17807 from poettering/bindtodevice
...
use SO_BINDTOIFINDEX while connect()
2020-12-03 08:50:43 +09:00
Yu Watanabe
f01a3b79fa
Merge pull request #17810 from systemd/meson-allows-fuzzer-building
...
meson: always allow fuzzers to be built
2020-12-03 07:36:43 +09:00
Yu Watanabe
59c31eba49
network: stop to assign UUID when reconfiguring link
...
This fixes the following race in reconfiguring link:
1. an interface requests UUID.
2. the interface is reconfigured and link_configure() is called.
3. sd-lldp client is started on the interface (it is enabled by default).
4. networkd acquires UUID, and get_product_uuid_handler() calls
link_configure() for the link again.
5. link_lldp_rx_configure() fails to set ifindex for already running
sd-lldp client.
6. the link enters failed state.
2020-12-02 20:31:39 +09:00
Yu Watanabe
f63e09ef75
network: use bus_error_message()
2020-12-02 20:31:39 +09:00
Yu Watanabe
0f82a2ab5c
meson: use '_' as separator in fuzz test names
...
Follow-up for d448888924 and ca121e20c4 .
Fixes #17568 .
2020-12-02 11:14:26 +01:00
Yu Watanabe
da115b935a
tree-wide: fix typos
2020-12-02 10:53:33 +01:00
Yu Watanabe
5f016e326d
network: add debug log about requesting DHCP address
...
This addresses
https://github.com/systemd/systemd/pull/17474#discussion_r515996491 .
2020-12-02 18:50:45 +09:00
Yu Watanabe
240e41372e
test-network: confirm that IPv4ll address is dropped after DHCPv4 lease is acquired
2020-12-02 18:50:13 +09:00
Yu Watanabe
878c035a48
sd-ipv4acd: logs current state
2020-12-02 18:42:17 +09:00
Yu Watanabe
3f2c0d8520
sd-ipv4acd,sd-ipv4ll: include interface name in the debug logs
2020-12-02 18:42:13 +09:00
Yu Watanabe
1f1d4d42c1
log-link: introduce log_interface_full_errno() macro
2020-12-02 18:41:01 +09:00
Yu Watanabe
99b06a2f5c
sd-ipv4acd,sd-ipv4ll: introduce _get_ifindex() and _get_ifname()
...
They will be used in later commits.
This also makes sd_ipv4acd_set_ifindex() check the existence of the interface.
2020-12-02 18:40:24 +09:00
Yu Watanabe
53ec5dd028
network: use IN_SET() macro
...
Follow-up for 1d370b2c18 .
2020-11-30 12:41:41 +09:00
Yu Watanabe
0d0799daf4
network: treat IPv4LL is one of dynamic addressing protocol
...
This makes an IPv4LL address optional when multiple dynamic
addressing protocols are enabled.
2020-11-30 12:41:41 +09:00
Yu Watanabe
0b4b66cc53
network: simplify the condition about ipv4ll is enabled or not
2020-11-30 12:41:41 +09:00
Yu Watanabe
d19b993983
network: shorten link_check_ready() a bit
2020-11-30 12:41:41 +09:00
Yu Watanabe
8ccae2dd2d
network: stop IPv4LL engine when DHCPv4 address is successfully acquired
2020-11-30 12:41:30 +09:00
Yu Watanabe
bb2d0a24f3
Merge pull request #17761 from keszybz/documentation-followups
...
Two tiny fixlets
2020-11-29 05:32:33 +09:00
Yu Watanabe
61c26ca87f
coccinelle: ignore specific cases to use SYNTHETIC_ERRNO() macro
2020-11-27 14:35:20 +09:00
Yu Watanabe
ba715423fe
cryptsetup: drop unnecessary bracket
2020-11-27 14:35:20 +09:00
Yu Watanabe
2940b12826
test: use for(;;) instead of while(true)
2020-11-27 14:35:20 +09:00
Yu Watanabe
614f57ed76
core/scope: use set_ensure_put()
2020-11-27 14:35:20 +09:00
Yu Watanabe
75f79cd2d8
mount-util: use mfree()
2020-11-27 14:35:20 +09:00
Yu Watanabe
95ca39f04e
oom: use CMP() macro
2020-11-27 14:35:20 +09:00
Yu Watanabe
751b440063
core: fix typo
2020-11-27 14:35:20 +09:00