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
Luca Boccassi
0b0ad494a0
Merge pull request #22458 from poettering/parse-safe-string
...
some safety tweaks to conf-parser.[ch]
2022-02-09 16:59:14 +00: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
Lennart Poettering
a99a85242c
tree-wide: use config_parse_safe_string() at various places
2022-02-09 10:17:33 +01:00
Santa Wiryaman
97f27f8a16
Add support for isolated parameter
...
Add the "Isolated" parameter in the *.network file, e.g.,
[Bridge]
Isolated=true|false
When the Isolated parameter is true, traffic coming out of this port
will only be forward to other ports whose Isolated parameter is false.
When Isolated is not specified, the port uses the kernel default
setting (false).
The "Isolated" parameter was introduced in Linux 4.19.
See man bridge(8) for more details.
But even though the kernel and bridge/iproute2 recognize the "Isolated"
parameter, systemd-networkd did not have a way to set it.
2022-02-09 17:37: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
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
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
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
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
613d65d88f
network: update operational state when we remove an address
2022-02-02 20:44:47 +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
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
5f468b9f57
network: dhcp-server: introduce special value DNS=_server_address
...
Closes #15026 .
2022-02-02 05:01:53 +09:00
Luca Boccassi
98fd285c28
Merge pull request #22331 from yuwata/network-xfrm-interface-id
...
network: xfrm: refuse zero interface ID
2022-02-01 13:25:38 +00: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
05c6311291
network: drop outdated TODO comment
...
Follow-up for 59aa622013 .
2022-02-01 15:38:42 +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
fb96111946
network: also use link_reconfigure_impl() to initially assign .network file
2022-02-01 11:38:01 +09:00
Yu Watanabe
bb193d2df2
network: drop tiny wrapper used only one place anymore
2022-02-01 11:37:45 +09:00
Yu Watanabe
3cf58ef316
network: do not free bound_by carrier map on reconfigure
...
Otherwise, if a link enters unmanaged state, then its carrier state does
not propagated to other interfaces.
2022-02-01 11:37:01 +09:00
Yu Watanabe
b69bfa4305
network: do not remove localhost address
...
Managing loopback interfaces by networkd is not recommended, but supporeted.
Even such spurious situation, do not drop the localhost addresses.
2022-02-01 11:30:37 +09:00
Yu Watanabe
259c65f36c
network: move ndisc_flush() to link_stop_engines()
...
As it is not related to any static configs.
2022-02-01 11:30:37 +09:00
Yu Watanabe
a0e99a377a
network: remove only managed configs on reconfigure or carrier lost
...
Otherwise, if the carrir of the non-managed interface is lost, the
configs such as addresses or routes on the interface will be removed by
networkd.
2022-02-01 11:30:37 +09:00
Frantisek Sumsal
e3d1ffcc48
network: s/confiured/configured/
...
A quick typo fix I noticed whilst debugging.
2022-01-31 23:07:41 +00:00
Yu Watanabe
c565b65553
network: currently IPv4ACD requires MAC address whose length is ETH_ALEN
2022-01-31 13:10:28 +09:00
Yu Watanabe
218a850268
network: currently RADV requires MAC address whose length is ETH_ALEN
2022-01-31 13:10:28 +09:00
Yu Watanabe
f4ef1c196c
network: disable NDisc for CAN interfaces
...
We already disabled DHCP clients for CAN interfaces.
2022-01-31 13:10:28 +09:00
Yu Watanabe
ba4c7184b3
network: configure NDisc after MAC address is assigned
2022-01-31 13:10:28 +09:00
Yu Watanabe
f42d41cc5f
network: configure DHCP clients after MAC address is assigned
...
Prompted by #20090 .
2022-01-31 13:10:28 +09:00
Yu Watanabe
e74f1d07b3
network: use hashmap_remove_value() at two more places
2022-01-29 00:30:22 +09:00
Yu Watanabe
1a054a208c
network: fix log messages
2022-01-28 08:34:57 +00:00
Yu Watanabe
cd7fcda543
wait-online: make manager_link_is_online() return 0 when in unmanaged state
...
Previously, even if a link is in unmanaged state, the function may
returns positive value. So, even if all managed links are in the configured
sate but do not satisfy the online criteria, e.g., IPv4 address state,
then wait-online finishes with positive value.
This makes the function always return 0 for unmanaged state. So, at
least one managed link must satisfies the online criteria.
This also adds more comments and debugging logs.
Fixes #22246 .
2022-01-26 22:41:47 +09:00