Yu Watanabe
42672c80dc
test: check if running in container earlier
2022-02-14 13:46:17 +00:00
Yu Watanabe
e41dcb8221
NEWS: clarify that ForceDHCPv6PDOtherInformation= is removed
...
Closes #22493 .
2022-02-13 11:50:05 +00:00
Yu Watanabe
81db4f3dd8
network: drop managed configs on reconfigure when KeepConfiguration=yes
...
Otherwise, the managed configs, that is addresses, routes and so on
configured by the previously assigned .network file will not be dropped
on reconfiguring the interface.
2022-02-13 20:01:42 +09:00
Yu Watanabe
07c160a65c
network: drop redundant condition
...
The function `link_drop_foreign_addresses()` is only called in
`link_drop_foreign_config()`, and the same condition is located in the
caller.
2022-02-13 20:01:29 +09:00
Yu Watanabe
74c60fcbec
cgroup-util: refuse the case that both path and suffix are empty strings
...
Fixes CID#1322378.
2022-02-12 11:01:52 +00:00
Yu Watanabe
2d88df457a
Merge pull request #22471 from yuwata/network-bridge-vlan-protocol
...
network: bridge: fix vlan protocol
2022-02-10 20:40:04 +09:00
Yu Watanabe
ac7e18be76
Merge pull request #22452 from yuwata/network-ipv6ll
...
network: use sysctl to set IPv6LL address generation mode when the interface is already up
2022-02-10 20:38:56 +09:00
Yu Watanabe
b6d5dab7bb
test-network: add missing tests for bridge properties
2022-02-10 18:04:34 +09:00
Yu Watanabe
6eb35be8e0
network: bridge: fix endian of vlan protocol
...
Fixes #22469 .
2022-02-10 17:47:17 +09:00
Yu Watanabe
2becdbccd1
test-network: add testcase for re-generating IPv6LL address
2022-02-10 17:35:48 +09:00
Yu Watanabe
2b25f4eb23
network: move link_set_ipv6ll_stable_secret() to networkd-ipv6ll.c
2022-02-10 17:34:06 +09:00
Yu Watanabe
05b8fc498e
network: skip to set IPv6LL address generation mode if the requested mode is already set
2022-02-10 17:34:06 +09:00
Yu Watanabe
6614116458
network: use log_link_warning_errno() or friends where applicable
2022-02-10 17:34:06 +09:00
Yu Watanabe
7d0d832d67
network: monitor current IPv6LL address generation mode
2022-02-10 17:34:06 +09:00
Yu Watanabe
80f2647dfb
network: introduce two helper functions for setting IPv6LL address generation mode
2022-02-10 17:34:02 +09:00
Yu Watanabe
e6e2b66b8f
Merge pull request #22248 from yuwata/network-tc-use-request-queue
...
network: tc: use request queue to configure QDisc or TClass
2022-02-09 18:57:37 +09:00
Yu Watanabe
e4bbd9c61e
network: tc: use hashmap to store traffic control settings in .network files
...
As now each qdisc or tclass is configured when it is ready.
2022-02-09 14:43:19 +09:00
Yu Watanabe
7ec1846242
network: tc: introduce order dependency of traffic control
2022-02-09 14:43:19 +09:00
Yu Watanabe
1dec9d816b
network: tc: use request queue to configure traffic control
...
But no dependency resolution is implemented.
2022-02-09 14:43:19 +09:00
Yu Watanabe
b3208e0fad
network: tc/teql: set tca_kind in verify()
...
Then, qdisc_configure() can be simplified.
2022-02-09 14:43:19 +09:00
Yu Watanabe
828a81a937
network: tc: monitor qdisc and tclass
2022-02-09 14:43:19 +09:00
Yu Watanabe
e8b8b3eacb
sd-netlink: allow to dump qdisc and tclass
2022-02-09 14:43:19 +09:00
Yu Watanabe
27e93a4b66
sd-netlink: make traffic control related message can be monitored
2022-02-09 14:43:19 +09:00
Yu Watanabe
1f38b6f9c6
sd-netlink: introduce sd_rtnl_message_traffic_control_get_{ifindex,parent,handle}()
2022-02-09 14:38:23 +09:00
Yu Watanabe
f50b93fed7
sd-netlink: unify sd_rtnl_message_new_qdisc() and sd_rtnl_message_new_tclass()
...
As the netlink message header types for both qdisc and tclass are
equivalent.
2022-02-09 14:35:25 +09:00
Yu Watanabe
89346ac6f6
network: coding style fixes
2022-02-09 14:35:25 +09:00
Yu Watanabe
55c6f705ba
network: tc: drop unnecessary conditions
...
As TC_H_UNSPEC is 0.
2022-02-09 14:35:25 +09:00
Yu Watanabe
058fd55efa
network: tc: drop unused QDisc::family element
2022-02-09 14:35:25 +09:00
Yu Watanabe
de2f372ea2
network: move ipv6ll related functions to networkd-ipv6ll.[ch]
2022-02-09 02:14:40 +09:00
Yu Watanabe
5573ed2230
Merge pull request #22448 from poettering/coredump-raise-sizes
...
coredump: raise limits
2022-02-09 01:23:07 +09:00
Yu Watanabe
217a610be4
Revert "ci: switch to fedora-35 on i386 on Packit"
...
This reverts commit 478c632e00 .
2022-02-08 19:00:28 +03:00
Yu Watanabe
319af1314a
Revert "packit: switch the remaining jobs to F35"
...
This reverts commit e7642152ae .
2022-02-08 19:00:28 +03:00
Yu Watanabe
18f84f8aba
udev/net: support to set MDI-X mode
...
Closes #22386 .
2022-02-08 15:47:46 +00:00
Yu Watanabe
ecdfb9a1ae
resolve: reuse timer event source for DnsQuery
...
If the query get CNAME or DNAME, then the query will be restarted.
Even in that case, previously, the event source was freed and allocated
again. Let's slightly optimize it.
2022-02-08 17:39:03 +09:00
Yu Watanabe
c704288c47
resolve: use _cleanup_ attribute for freeing DnsQuery
2022-02-08 17:38:42 +09:00
Yu Watanabe
fe8c5ce615
resolve: fix possible memleak
...
Fortunately, unlike the issue fixed in the previous commit, the memleak
should be superficial and not become apparent, as the queries handled
here are managed by the stub stream, and will be freed when the stream
is closed.
Just for safety, and slightly reducing the runtime memory usage by the
stub stream.
2022-02-08 17:38:42 +09:00
Yu Watanabe
73bfd7be04
resolve: fix potential memleak and use-after-free
...
When stub stream is closed early, then queries associated to the stream
are freed. Previously, the timer event source for queries may not be
disabled, hence may be triggered with already freed query.
See also dns_stub_stream_complete().
Note that we usually not set NULL or zero when freeing simple objects.
But, here DnsQuery is large and complicated object, and the element may
be referenced in subsequent freeing process in the future. Hence, for
safety, let's set NULL to the pointer.
2022-02-08 17:35:53 +09:00
Yu Watanabe
ea853de57d
network: enable KeepConfiguration= when running on network filesystem
...
Also, set KeepConfiguration=dhcp-on-stop by default when running in
initrd.
Fixes #21967 .
2022-02-05 09:42:32 +09:00
Yu Watanabe
166e8e36eb
Merge pull request #22416 from fbuihuu/misc
...
Misc
2022-02-05 09:26:40 +09:00
Yu Watanabe
4e247216e5
stat-util: introduce path_is_network_fs()
2022-02-04 15:22:20 +09:00
Yu Watanabe
318a53d10a
network-generator: rename DHCP_TYPE_DHCP -> DHCP_TYPE_DHCP4
...
To emphasize this is DHCPv4. No behavior is changed.
2022-02-04 13:59:42 +09:00
Yu Watanabe
7809cab717
test-network: add testcase for external tunnel
2022-02-03 11:12:34 +09:00
Yu Watanabe
1ae308abb5
network: tunnel: support external mode
...
Closes #22352 .
2022-02-03 11:12:01 +09:00
Yu Watanabe
acd8abb7f9
network: tunnel: reorder setting ip6tnl attributes
...
Just for improving readability.
2022-02-03 11:10:15 +09:00
Yu Watanabe
a07e07cd9c
network: tunnel: reduce indentation in config_parse_encap_limit()
2022-02-03 11:10:15 +09:00
Yu Watanabe
59c8bef008
network: tunnel: reduce indentation in config_parse_ipv6_flowlabel()
2022-02-03 11:10:15 +09:00
Yu Watanabe
396dfe0a14
network: tunnel: use "data" field to assign result
2022-02-03 11:10:15 +09:00
Yu Watanabe
84e8602dfe
test: use rm_rf_physical_and_freep cleanup function
2022-02-02 15:31:40 +00:00
Yu Watanabe
613d65d88f
network: update operational state when we remove an address
2022-02-02 20:44:47 +09:00
Yu Watanabe
4900ae14a5
sd-device: drop device_new_from_synthetic_event() from libsystemd
...
It is used by only test-udev.c.
2022-02-02 20:34:38 +09:00
Yu Watanabe
043543f1bb
udevadm: trigger: drop unnecessary slash
2022-02-02 20:34:38 +09:00
Yu Watanabe
f4f3249539
udevadm: make test and test-builtin command accept /dev path or device unit
2022-02-02 20:34:38 +09:00
Yu Watanabe
2079898088
sd-device: make device_set_action() take sd_device_action_t
2022-02-02 20:34:38 +09:00
Yu Watanabe
7f2e3eea28
sd-device: move device_read_uevent_file() to device-private.h
...
Then, it can be used by our tools or daemons.
2022-02-02 20:34:38 +09:00
Yu Watanabe
f30943c12f
udev: do not generate format dynamically
...
Prompted by LGTM.
2022-02-02 20:34:31 +09:00
Yu Watanabe
e85fdacc8a
test: allow to set NULL to intro or outro
...
Addresses https://github.com/systemd/systemd/pull/22338#discussion_r796741033 .
2022-02-02 11:06:54 +00:00
Yu Watanabe
6f6b017b9b
test: add a test for mkdir_p()
2022-02-02 15:09:45 +09:00
Yu Watanabe
5117059ee9
mkdir: allow to create directory whose path contains symlink
...
Fixes a regression caused by 3008a6f21c .
Before the commit, when `mkdir_parents_internal()` is called from `mkdir_p()`,
it uses `_mkdir()` as `flag` is zero. But after the commit, `mkdir_safe_internal()`
is always used. Hence, if the path contains a symlink, it fails with -ENOTDIR.
To fix the issue, this makes `mkdir_p()` calls `mkdir_parents_internal()` with
MKDIR_FOLLOW_SYMLINK flag.
Fixes #22334 .
2022-02-02 15:09:45 +09:00
Yu Watanabe
e22916e61d
mkdir: CHASE_NONEXISTENT cannot used in chase_symlinks_and_stat()
2022-02-02 15:09:45 +09:00
Yu Watanabe
e4de58c823
core/mount: fail early if directory cannot be created
...
Prompted by #22334 .
2022-02-02 15:09:45 +09:00
Yu Watanabe
891c9b36cf
Merge pull request #22350 from poettering/journal-read-object-fix
...
journal: various fixes to journal_file_read_object()
2022-02-02 13:47:32 +09:00
Yu Watanabe
faa1b3c6c4
network: dhcp-server: make empty string to DNS= or friends clear previously specified servers
2022-02-02 10:02:57 +09:00
Yu Watanabe
32f8a613c5
sd-dhcp-lease: store static routes and classless static routes in different arrays
...
When classless static routes option is provided, then static routes
option should not be used. Hence, let's not mix and store them in one
storage.
This introduce sd_dhcp_lease_get_static_routes() and
sd_dhcp_lease_get_classless_routes().
2022-02-02 10:02:44 +09:00
Yu Watanabe
64a6b5ed21
Merge pull request #22351 from mrc0mmand/TEST-56-cgroupsv1
...
test: require unified cgroup hierarchy for TEST-56
2022-02-02 10:02:26 +09:00
Yu Watanabe
6a8ab6dd1e
Merge pull request #22332 from yuwata/network-dhcp-server-dns-server-address
...
network: dhcp-server: allow to specify server address for DNS= or friends
2022-02-02 07:07:22 +09:00
Yu Watanabe
e0ec975148
Merge pull request #22327 from joanbm/main_resolved_improvements
...
resolved: misc. small DnsStream refactors and improvements
2022-02-02 07:06:56 +09:00
Yu Watanabe
c5f7a08739
test-network: add tests for DNS=_server_address in [DHCPServer]
2022-02-02 05:01:59 +09:00
Yu Watanabe
5f468b9f57
network: dhcp-server: introduce special value DNS=_server_address
...
Closes #15026 .
2022-02-02 05:01:53 +09:00
Yu Watanabe
82140e956c
Merge pull request #22310 from yuwata/sd-dhcp-lease-fixes
...
sd-dhcp-lease: two fixes
2022-02-02 04:55:07 +09:00
Yu Watanabe
bab29f2ab7
network: dhcp-server: also refuse link local address to use as the server address
2022-02-01 11:18:53 +00:00
Yu Watanabe
77e73102dd
network: use GREEDY_REALLOC() at one more place
2022-02-01 16:14:59 +09:00
Yu Watanabe
c0fdc91e44
sd-dhcp-server: convert null address for e.g. DNS to server address
2022-02-01 16:09:17 +09:00
Yu Watanabe
c997f51c0f
sd-dhcp-server: use free_and_replace() at one more place
2022-02-01 15:49:52 +09:00
Yu Watanabe
05c6311291
network: drop outdated TODO comment
...
Follow-up for 59aa622013 .
2022-02-01 15:38:42 +09:00
Yu Watanabe
b0f83c2d82
Merge pull request #22254 from yuwata/dhcp-server-fix-segfault
...
sd-dhcp-server: remove lease with hashmap_remove_value()
2022-02-01 14:10:11 +09:00
Yu Watanabe
a8dfcd2c0f
Merge pull request #22319 from yuwata/network-use-reconfigure
...
network: also use link_reconfigure_impl() to initially assign .network file
2022-02-01 14:09:32 +09:00
Yu Watanabe
020483b248
test-network: set xfrm interface ID
...
This also unifies two tests for xfrm, and checks the output of
'ip link' command.
Fixes #22329 .
2022-02-01 13:26:43 +09:00
Yu Watanabe
fd11005951
network: xfrm: refuse zero interface ID
...
Since kernel 5.17-rc1, 5.16.3, and 5.15.17 (more specifically,
https://github.com/torvalds/linux/commit/8dce43919566f06e865f7e8949f5c10d8c2493f5 )
the kernel refuses to create an xfrm interface with zero ID.
2022-02-01 13:15:11 +09:00
Yu Watanabe
06cf04dff4
sd-dhcp-lease: fix memleak
...
Fixes https://github.com/systemd/systemd/pull/22294#issuecomment-1024840811 .
2022-02-01 12:23:59 +09:00
Yu Watanabe
7b86854307
sd-dhcp-lease: fix reading unaligned memory
...
The destination address was read twice, one is for prefixlen, and
other is for destination address itself. And for prefixlen, the address
might be read from unaligned buffer.
This also modernizes the code.
2022-02-01 12:23:55 +09:00
Yu Watanabe
a46abf2e34
fuzz-dhcp-server: add static leases
2022-02-01 11:56:22 +09:00
Yu Watanabe
6796c5a9c4
test-dhcp-server: add tests for static lease
2022-02-01 11:56:22 +09:00
Yu Watanabe
7b5445e74e
test-dhcp-server: add tests for setting static DHCP lease
2022-02-01 11:56:22 +09:00
Yu Watanabe
99e65b7df3
test-dhcp-server: add usual headers
2022-02-01 11:56:22 +09:00
Yu Watanabe
4f3cb2465a
test-dhcp-server: run a test earlier which does not require privilege
2022-02-01 11:56:22 +09:00
Yu Watanabe
4e2319afe4
test-dhcp-server: move sd-event allocation
2022-02-01 11:56:22 +09:00
Yu Watanabe
7e0a8bf1ce
test-dhcp-server: use log_tests_skipped_errno()
2022-02-01 11:56:22 +09:00
Yu Watanabe
8b572f7ab2
sd-dhcp-server: split out logic to ACK request
2022-02-01 11:56:22 +09:00
Yu Watanabe
bd1a3eb65b
sd-dhcp-server: do not assign address reserved for static leases to non-matching clients
...
This fix the root cause of the issue #22253 .
2022-02-01 11:56:22 +09:00
Yu Watanabe
7e98fe05a0
sd-dhcp-server: explicitly refuse when conflicting address is requested
2022-02-01 11:56:22 +09:00
Yu Watanabe
e2ba408084
sd-dhcp-server: do not assign an address from pool when a static lease for the client ID exists
2022-02-01 11:56:22 +09:00
Yu Watanabe
5cc8be890d
sd-dhcp-server: rename get_pool_offset() -> address_is_in_pool()
...
As, the value of pool_offset is not used.
2022-02-01 11:56:22 +09:00
Yu Watanabe
eb5bff9c9d
sd-dhcp-server: rename server_send_nak() -> server_send_nak_or_ignore()
...
And logs error in the function.
2022-02-01 11:56:01 +09:00
Yu Watanabe
8a7d048d1d
sd-dhcp-server: set DHCPLease::server before hashmap_put()
...
Otherwise, if the second push is failed, then the first hashmap contains
dirty entry.
Also, this makes hashmap_remove_value() used when removing leases to
make not wrong lease is removed from the hashmap.
Note, this just hide the root cause of the issue #22253 , which will be
fixed in later commit.
Fixes #22253 .
2022-02-01 11:45:51 +09:00
Yu Watanabe
37e219800f
sd-dhcp-server: fix indentation
2022-02-01 11:45:51 +09:00
Yu Watanabe
48be485b71
sd-dhcp-server: rename argument and add one missing assertion
2022-02-01 11:45:51 +09:00
Yu Watanabe
6277e48fa9
sd-dhcp-server: do not use implicit cast to boolean from integer
2022-02-01 11:45:51 +09:00
Yu Watanabe
a2a801926d
sd-dhcp-server: refuse zero length client ID
2022-02-01 11:45:51 +09:00
Yu Watanabe
0a195d4186
sd-dhcp-server: do not log "STOPPED" when already stopped
2022-02-01 11:45:51 +09:00
Yu Watanabe
fb96111946
network: also use link_reconfigure_impl() to initially assign .network file
2022-02-01 11:38:01 +09:00