Yu Watanabe
aa10fa8d3a
Merge pull request #20442 from yuwata/network-can-introduce-many-settings
...
network: introduce several CAN interface related settings
2021-08-17 02:40:32 +09:00
Yu Watanabe
b164b570b4
network: can: allow to specify bit-timing with TimeQuantaNSec= and friends
...
Closes #19424 and #20435 .
2021-08-16 22:30:38 +09:00
Yu Watanabe
817561cc60
network: SamplePoint= should be specified only when BitRate= is specified
...
See can_get_bittiming() in drivers/net/can/dev/bittiming.c of kernel.
2021-08-16 18:54:01 +09:00
Yu Watanabe
239f91f71c
network: can: make Termination= optionally take a raw resistor value
...
Note that this slightly breaks backward compatibility when
Termination=1. Previously, this is handled as boolean true, then 120 ohm
was used. But now with this commit, it is handled as 1 ohm.
2021-08-16 18:52:24 +09:00
Yu Watanabe
6dd84c9e86
network: can: add missing control modes
2021-08-16 18:42:48 +09:00
Yu Watanabe
f1c141cb82
network: can: introduce config_parse_can_control_mode()
2021-08-16 18:42:48 +09:00
Yu Watanabe
0fa2984dad
network: can: refuse too large restart sec earlier
2021-08-16 18:42:45 +09:00
Yu Watanabe
952508abda
network: can: move function
2021-08-16 01:07:06 +09:00
Yu Watanabe
4931217a67
basic/linux: update linux uapi headers
2021-08-16 01:07:06 +09:00
Yu Watanabe
8908ceb7a8
Merge pull request #20432 from yuwata/network-recreate-stacked-netdevs
...
network: recreate stacked netdevs when underlying device is re-added
2021-08-13 17:31:28 +09:00
Yu Watanabe
1e8cce8f1e
network: fix configuring of CAN devices
...
Fix a bug introduced by 7558f9e717 .
Fixes #20428 .
2021-08-12 11:44:13 +02:00
Yu Watanabe
1d0c9bd753
test-network: add a testcase for recreating stacked netdevs
2021-08-12 15:03:50 +09:00
Yu Watanabe
2f117922d4
network: recreate stacked netdevs when underlying device is re-added
...
Closes #20430 .
2021-08-12 15:03:47 +09:00
Yu Watanabe
b14686ff3a
network: adjust log messages, function names, etc.
2021-08-12 14:39:39 +09:00
Yu Watanabe
8f65304c5d
network: use netdev_enter_failed() instead of netdev_drop() on error
...
Preparation for later commits to support reconfiguring netdevs.
2021-08-12 14:23:57 +09:00
Yu Watanabe
798e5dc8ae
network: introduce a helper function netdev_is_stacked_and_independent()
2021-08-12 14:10:45 +09:00
Yu Watanabe
0995accdfd
hostname: introduce gethostname_full() and use it in various gethostname() variants
2021-08-12 13:48:15 +09:00
Yu Watanabe
ccdf235464
hostname: fix off-by-one issue in gethostname()
...
gethostname() returns null-terminated hostname.
Fixes #20309 and #20417 .
2021-08-12 13:48:15 +09:00
Yu Watanabe
af0d4e6ef5
test-network: test static lease outside of pool
2021-08-11 16:43:26 +09:00
Yu Watanabe
b713a99b1a
sd-dhcp-server: support static lease outside of address pool
...
Closes #20341 .
2021-08-11 16:43:26 +09:00
Yu Watanabe
3dc8fb0eb8
sd-dhcp-server: fix possible double-free or use-after-free
2021-08-11 16:43:25 +09:00
Yu Watanabe
cedf6a8da5
sd-dhcp-server: use hashmap_ensure_put()
2021-08-11 16:43:25 +09:00
Yu Watanabe
0eec7f5ffa
sd-dhcp6-client: use SYNTHETIC_ERRNO()
2021-08-10 21:57:42 +09:00
Yu Watanabe
de949e911e
sd-dhcp6-client: cirtainly adjust T1 and T2
...
This fixes a bug introduced by 99f1d3fc50 .
Note that in the information requesting mode, the lease has neither
addresses nor PD prefixes.
2021-08-10 21:39:30 +09:00
Yu Watanabe
0c42b61348
sd-dhcp6-client: fix copy-and-paste mistake
...
Fix bug introduced by b47fb949b3 .
2021-08-10 21:36:07 +09:00
Yu Watanabe
76b34df91f
Merge pull request #20410 from yuwata/network-ndisc-cleanups
...
network: several NDisc cleanups
2021-08-10 19:44:39 +09:00
Yu Watanabe
8fd9920273
Merge pull request #19939 from yuwata/network-dhcp-client-use-request-queue
...
network: use request queue to configure DHCP clients
2021-08-10 19:44:14 +09:00
Yu Watanabe
5e739f7eed
Merge pull request #19901 from yuwata/network-reconfigure-after-sleep
...
network: reconfigure interface after coming back from sleep
2021-08-10 19:43:54 +09:00
Yu Watanabe
c6f78234d1
udev: skip event when its dependency cannot be checked
2021-08-10 15:35:57 +09:00
Yu Watanabe
044ac33c35
udev: do not try to find blocker again when no blocker found previously
2021-08-10 15:35:01 +09:00
Yu Watanabe
bd335c961f
list: introduce LIST_FOREACH_BACKWARDS() macro and drop LIST_FOREACH_AFTER/BEFORE()
2021-08-10 15:32:27 +09:00
Yu Watanabe
a1fa99d841
udev: rename is_device_busy() -> event_is_blocked()
...
Also this rename delaying_seqnum -> blocker_seqnum.
2021-08-10 15:19:41 +09:00
Yu Watanabe
5f4bca9dcc
udev: do not try to process events if there is no free worker
2021-08-10 15:19:41 +09:00
Yu Watanabe
f2a5412bf2
udev: propagate error on spawning a worker
2021-08-10 15:19:41 +09:00
Yu Watanabe
92fd70addf
udev: add usec_add() at one more place
2021-08-10 15:19:41 +09:00
Yu Watanabe
0744e74c52
udev: make event_queue_start() return negative errno on error
2021-08-10 15:19:27 +09:00
Yu Watanabe
5393c52897
udev: make event_free() return NULL
2021-08-10 15:16:56 +09:00
Yu Watanabe
6be97d67c8
udev: update log message to clarify that the error is ignored
2021-08-10 15:16:56 +09:00
Yu Watanabe
419ec63135
udev: move several functions
...
No functional chage.
2021-08-10 15:16:56 +09:00
Yu Watanabe
e0d61dac33
udev: also rename struct udev_ctrl -> UdevCtrl
2021-08-10 15:16:56 +09:00
Yu Watanabe
d9239923c1
udev: rename type name e.g. struct worker -> Worker
2021-08-10 15:16:56 +09:00
Yu Watanabe
4c2c2a1256
network: use usec_add() at several more places
2021-08-10 15:12:24 +09:00
Yu Watanabe
ae48d2d142
network: make IPv6Token private, and ipv6token_new() static
2021-08-10 15:12:24 +09:00
Yu Watanabe
f784681a3e
network: ndisc: update a log message
...
Also slightly rename functions.
2021-08-10 15:12:24 +09:00
Yu Watanabe
b378b150b7
network: adjust log messages
...
Follow-up for #19944 .
2021-08-10 15:04:04 +09:00
Yu Watanabe
8716018664
network: DHCP[46] -> DHCPv[46] in log messages
2021-08-10 15:02:35 +09:00
Yu Watanabe
ccffa166d8
network: use request queue to configure DHCP{4,6} clients
...
Previously, when UUID is requested for DUID, then the clients are
configured in callback of bus methods.
But now, 'request queue' was implemented, so we can use it to wait until
the product UUID is obtained.
2021-08-10 14:55:34 +09:00
Yu Watanabe
6211b7362a
network: do not request UUID frequently on failure
...
If many interfaces request UUID, and networkd cannot get it for some
reasons, then previously we call the DBus method so frequently.
2021-08-10 14:48:18 +09:00
Yu Watanabe
bc8bd68db8
network: downgrade log level in dhcp6_configure()
...
And make the callers warn about failures.
2021-08-10 14:48:18 +09:00
Yu Watanabe
5aebe9c898
network: downgrade log level in dhcp4_configure()
...
And make the callers warn about failures.
2021-08-10 14:48:18 +09:00
Yu Watanabe
3bad5487e9
test-network: add a testcase to enter unmanaged state on reconfiguring
2021-08-10 14:44:47 +09:00
Yu Watanabe
cb71e9c606
network: drop configurations in the previous .network file when entering unmanaged state
...
When reconfiguring an interface and it will enter unmanaged state,
let's drop configurations from the previously assigned .network file.
2021-08-10 14:44:39 +09:00
Yu Watanabe
5e3bb5da98
network: do not drop foreign configs for loopback and critical interfaces on carrier lost
2021-08-10 14:43:54 +09:00
Yu Watanabe
6bfa06fc39
network: do not drop foreign configs based on the previous .network file
...
`link_drop_foreign_config()` will be called later in link_configure().
2021-08-10 14:43:54 +09:00
Yu Watanabe
f85499108f
network: start/stop LLDP client on carrier gained/lost
...
Then, link_acquire_dynamic_conf() matches link_stop_engines().
Previously, LLDP client is started on interface is up, and stopped
on both down and carrier loss.
2021-08-10 14:43:54 +09:00
Yu Watanabe
d09a179e69
network: reconfigure link after coming back from sleep
...
Previously, link was reconfigured with `link_carrier_reset()`, but it
just re-request to configure static addresses, routes, etc, and restart
engines (e.g. DHCP client).
However, after coming back from sleep, several link information may be
changed, especially the wifi access point may be different. So, we may
need to reconfigure the interface.
2021-08-10 14:43:34 +09:00
Yu Watanabe
5865dc1493
network: use monotonic instead of boot time to handle address creation/update timestamp
...
Follow-up for 25db3aeaf3 and 899034ba81 .
Fixes another issue in #20244 .
2021-08-09 10:33:49 +02:00
Yu Watanabe
d7799877a0
sd-dhcp6-client: do not ignore errors in client_receive_advertise()
...
This also adds several debug log messages.
2021-08-05 11:14:23 +01:00
Yu Watanabe
6178e2f889
core: wrap cgroup path with empty_to_root() in log messages
...
This fixes e.g. the following log message:
---
systemd[1]: -.slice: Failed to migrate controller cgroups from , ignoring: Read-only file system
---
2021-08-05 03:14:46 +09:00
Yu Watanabe
0cddb53c85
core/cgroup: fix error handling of cg_remove_xattr()
2021-08-05 03:13:48 +09:00
Yu Watanabe
801cf85935
Merge pull request #20377 from yuwata/network-bridge-fdb-20305
...
network: always append new bridge FDB entries
2021-08-05 02:44:24 +09:00
Yu Watanabe
c347a98272
network: ignore errors on unsetting master ifindex
...
Fixes #20241 .
2021-08-05 00:10:55 +09:00
Yu Watanabe
988b0660aa
test-network: add a test case for issue #20373
2021-08-04 23:22:20 +09:00
Yu Watanabe
1171f3f030
network: ignore errors on setting bridge config
...
For some setups, kernel refuses to set bridge configs with -EOPNOTSUPP.
See kernel's rtnl_bridge_setlink() in net/core/rtnetlink.c.
Fixes #20373 .
2021-08-04 23:19:49 +09:00
Yu Watanabe
17d808a8bf
network: add comments
2021-08-04 23:03:27 +09:00
Yu Watanabe
4a906586f8
test-network: add a testcase for UplinkInterface= in [IPv6SendRA]
2021-08-04 22:21:00 +09:00
Yu Watanabe
63295b42ae
network: introduce UplinkInterface= in [IPv6SendRA]
2021-08-04 22:20:56 +09:00
Yu Watanabe
a254fab20d
network: use request queue to configure IPv6 RA engine
2021-08-04 22:19:14 +09:00
Yu Watanabe
2b24292692
network: update comment and man page
2021-08-04 22:19:14 +09:00
Yu Watanabe
cca07d910a
test-network: add a testcase for vxlan with IPv6 local address
2021-08-04 18:33:23 +09:00
Yu Watanabe
74c1ab841f
sd-netlink: always append new bridge FDB entries
...
This partially reverts 192a9d95ea (#19432 ).
Fixes #20305 .
2021-08-04 18:16:47 +09:00
Yu Watanabe
10e417b3ea
network: use address_equal()/route_equal() to compare addresses or routes configured by NDisc
...
Fixes #20244 .
2021-08-04 09:22:38 +01:00
Yu Watanabe
c7cfde640d
Merge pull request #20346 from poettering/strlen-unsigned-fix
...
CONST_MAX() integer size fix
2021-08-03 11:03:29 +09:00
Yu Watanabe
8bdef77400
Merge pull request #20251 from keszybz/test-format-lifetime
...
Add test for format_lifetime() and fix prefix
2021-07-20 06:13:50 +09:00
Yu Watanabe
2d302d88e4
network: configure address with requested lifetime
...
When assigning the same address provided by a dynamic addressing
protocol, the new lifetime is stored on Request::Address, but not
Address object in Link object, which can be obtained by address_get().
So, we need to configure address with Address object in Request.
Fixes #20245 .
2021-07-19 17:38:16 +01:00
Yu Watanabe
f843f85da8
tree-wide: FORMAT_TIMESTAMP() or friends must be used as a function argument
...
Follow-ups for #20109 .
2021-07-15 20:03:46 +09:00
Yu Watanabe
fa3f917a25
network: slightly simplify log_address_debug()
2021-07-15 19:18:45 +09:00
Yu Watanabe
0fd97a2533
network: introduce FORMAT_LIFETIME()
...
Fixes a bug introduced by 5291f26d4a .
Fixes #20227 .
2021-07-15 19:17:32 +09:00
Yu Watanabe
6c39b39aa8
Merge pull request #20209 from yuwata/network-dhcp4-semi-static-route-with-use-gateway-no
...
network: dhcp4: support semi-static route with Gateway=_dhcp4 with UseGateway=no
2021-07-15 11:57:11 +09:00
Yu Watanabe
4df8a8e809
test-network: add a testcase for semi-static route with Gateway=_dhcp4 when UseGateway=no
2021-07-15 04:17:14 +09:00
Yu Watanabe
87e62d32b4
test-network: adjust testcases to follow the previous changes
2021-07-15 04:17:14 +09:00
Yu Watanabe
0ebab55f4f
network: dhcp4: also support semi-static routes with Gateway=_dhcp4 when UseGateway=no or UseRoutes=no
...
This makes the default gateway is read from classless static routes or
router option even if UseGateway=no or UseRoutes=no, and will be used
when configuring semi-static routes such that specified with Gateway=_dhcp4.
This also changes the behavior of RoutesToDNS= or RoutesToNTP=.
Previously, the DNS or NTP servers are not in the same network, then the
routes to the servers were not configured when UseGateway=no or
UseRoutes=no. With this commit, the default gateway in classless static
routes or router option will used to connecting the servers even if
UseGateway=no or UseRoutes=no.
Fixes #20208 .
2021-07-15 04:17:09 +09:00
Yu Watanabe
77976a6877
network: further unification of MUD url parsers
...
Follow-up for 89fa9a6b7b .
2021-07-14 17:41:00 +01:00
Yu Watanabe
e18f21e349
Merge pull request #20109 from keszybz/timestamp-macros
...
Add macros that define scratch buffer internally for timestamp/timespan formatting
2021-07-14 16:14:08 +09:00
Yu Watanabe
54d1fdb244
network: update interface name stored in various network engines
2021-07-14 00:40:47 +01:00
Yu Watanabe
bedc15706e
Merge pull request #20120 from yuwata/test-oomd-debug
...
test: enable debug logging of oomd
2021-07-13 23:30:16 +09:00
Yu Watanabe
176b8be10f
network: check the received interface name is actually new
...
For some reasons I do not know, on interface renaming, kernel once send
netlink message with old interface name, and then send with new name.
If eth0 is renamed, and then new interface appears as eth0, then the
message with the old name 'eth0' makes the interface enters failed
state.
To ignore such invalid(?) rename event messages, let's confirm the
received interface name.
Fixes #20203 .
2021-07-13 19:20:31 +09:00
Yu Watanabe
1d26d4cd14
test-network: add a testcase for ManageForeignRoutes=no
2021-07-12 20:59:42 +09:00
Yu Watanabe
11046cea14
network: also check addresses when determine a gateway address is reachable or not
...
Fixes #20201 .
2021-07-12 16:35:48 +09:00
Yu Watanabe
d0e18bb4b0
Merge pull request #20166 from poettering/fsync-more
...
various tweaks to existing fsync() helpers, and some new apis
2021-07-09 07:32:01 +09:00
Yu Watanabe
452a07cfd6
Merge pull request #20168 from poettering/signal-util-tweak
...
generalize SIGINT handling in copy.c
2021-07-09 07:24:43 +09:00
Yu Watanabe
f1ee01e342
Merge pull request #20167 from poettering/format-table-tweaks
...
format-table: three new features
2021-07-09 07:20:49 +09:00
Yu Watanabe
8ca29d97f2
wait-online: fix typo
2021-07-07 11:06:11 +02:00
Yu Watanabe
d7f223d738
Merge pull request #20098 from milaq/hwdb_logitech_additions
...
hwdb: Additions and fixes to Logitech mice
2021-07-05 08:10:11 +09:00
Yu Watanabe
7d5f4f1d4f
test: also show the memory pressure of testchill.service
...
The memory pressure should be small, but let's log the value in
the journal of the test environment.
2021-07-03 05:05:36 +09:00
Yu Watanabe
fa7ff467b6
test: check memory pressure more frequently
2021-07-03 05:05:33 +09:00
Yu Watanabe
b7674ab206
test: enable debug logging of systemd-oomd
2021-07-03 05:04:59 +09:00
Yu Watanabe
899034ba81
network: fix overflow issue in address lifetime calculation
...
Fixes another issue reported in #20050 . See
https://github.com/systemd/systemd/issues/20050#issuecomment-872967337 .
2021-07-02 22:26:07 +09:00
Yu Watanabe
e95ec7cd1e
network: drop old dhcp6 addresses or routes after new ones are configured
...
Fixes the issue similar to #20050 but for DHCP6.
2021-07-02 20:59:38 +09:00
Yu Watanabe
fe139e8ef9
network: drop old ndisc configurations after new ones are configured
...
Previously, `ndisc_remove_old_one()` checked `ndisc_{addresses,routes}_configured`
flags, but they are not unset when all addresses or routes are already
assigned.
After the request queue is implemented, the address or route requests
are not processed within the same event of ndisc handler is called, but
will processed later when they are ready. So, calling `ndisc_remove_old()`
in the event of ndisc handler will remove all addresses and routes
previously assigned even they are requested to be updated.
This makes `ndisc_remove_old()` do nothing when there exist some
requests to configure addresses and routes, thus previously assigned
addresses and routes are kept until all requests are processed.
Fixes #20050 .
2021-07-02 20:59:38 +09:00