1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

51773 Commits

Author SHA1 Message Date
Yu Watanabe
0e397560cc network: it is not necessary to call RTM_GETLINK when carrier is gained 2021-06-08 06:39:48 +09:00
Yu Watanabe
440d40dcc0 network: set bridge or bond properties after master ifindex is set 2021-06-08 06:39:48 +09:00
Yu Watanabe
1362bd6c64 network: sync link information after set-link request is processed
Some properties do not notify their changes. See do_setlink() in
net/core/rtnetlink.c of kernel.
2021-06-08 06:39:48 +09:00
Yu Watanabe
5a1860f761 network: use link_call_getlink() where applicable 2021-06-08 06:39:48 +09:00
Yu Watanabe
79c6e11456 network: introduce link_call_getlink() 2021-06-08 06:39:48 +09:00
Yu Watanabe
0d411b7f8f network: split link_update() into small pieces 2021-06-08 06:39:26 +09:00
Yu Watanabe
852a391605 network: shorten code a bit, and reduce indentation 2021-06-08 06:35:49 +09:00
Yu Watanabe
b156a95d4a network: update operational state or friends on reconfigure 2021-06-08 06:35:49 +09:00
Yu Watanabe
4b9a8c2b51 network: make link enter failed state when link_initialized() is failed 2021-06-08 06:35:49 +09:00
Yu Watanabe
0c9ee5d5e8 network: move functions
This changes no behavior. Preparation for later commits.
2021-06-08 06:35:49 +09:00
Yu Watanabe
813572853e network: introduce link_get_master() and use it where applicable 2021-06-08 06:35:49 +09:00
Yu Watanabe
8252fb4439 network: introduce link_request_to_set_bridge_vlan()
This will be used in later commits.
2021-06-08 06:35:45 +09:00
Yu Watanabe
bfd7fb09cf sd-netlink: add IFLA_BRIDGE_FLAGS and IFLA_BRIDGE_VLAN_INFO attributes 2021-06-08 06:34:41 +09:00
Yu Watanabe
5106ad00e6 network: expose bridge_vlan_append_info() 2021-06-08 06:34:38 +09:00
Yu Watanabe
5546870e7b network: introduce network_adjust_bridge_vlan() 2021-06-08 06:33:27 +09:00
Yu Watanabe
1a0e5ca2f3 network: rebreak arguments 2021-06-08 06:33:27 +09:00
Yu Watanabe
9670e45a6e network: rename networkd-brvlan.[ch] -> networkd-bridge-vlan.[ch] 2021-06-08 06:33:27 +09:00
Yu Watanabe
5062b8593a network: introduce link_request_to_set_bond()
This will be used in later commits.
2021-06-08 06:33:27 +09:00
Yu Watanabe
7d5b232f40 network: introduce link_request_to_set_bridge()
This will be used in later commits.
2021-06-08 06:33:27 +09:00
Yu Watanabe
71a754f70f network: introduce link_request_to_create_stacked_netdev()
This will be used in later commits.
2021-06-08 06:33:27 +09:00
Yu Watanabe
d24bf1b514 network: introduce link_request_to_set_master()
The function will be used later.
2021-06-08 06:33:27 +09:00
Yu Watanabe
8e00e24cc9 network: use request queue to set IPv6LL address generation mode 2021-06-08 06:33:27 +09:00
Yu Watanabe
cc4c8fb136 network: use request queue to set interface group 2021-06-08 06:33:27 +09:00
Yu Watanabe
a8e5e27c9f network: use request queue to set MAC address 2021-06-08 06:33:27 +09:00
Yu Watanabe
93fabc10fa network: use request queue to set link flags 2021-06-08 06:33:27 +09:00
Yu Watanabe
0fa8ee6c77 network: use request queue to set MTU 2021-06-08 06:33:27 +09:00
Yu Watanabe
fa28381202 network: merge link_configure() and link_configure_continue() again
It is not necessary to stop whole configuration process until MTU and
IPv6LL address generation mode are set. But it is enough just setting
IPv6 MTU again after MTU is set, and dropping IPv6LL address after
setting the address generation mode.
2021-06-08 06:33:27 +09:00
Yu Watanabe
793117b3fd network: drop meaningless condition about setting MTU
The condition does not fix infinite loop of interface reset, as the
interface is reset after netlink reply is received, thus setting_mtu is
false.

See also #18738.
2021-06-08 06:33:27 +09:00
Yu Watanabe
b9bf3f22a8 network: introduces link_drop_ipv6ll_addresses()
It is not necessary to parse whole message and store the address in
Link::addresses_foreign, as the address will be removed soon later.
2021-06-08 06:33:27 +09:00
Yu Watanabe
f0269653e9 network: make link enter failed state on failure in link_update() and link_reset_carrier()
Previously, several failures in link_carrier_gained() make link enter
failed state, and other errors are ignored. Now, all failures in
link_carrier_gained(), moreover, link_update() are critical.
2021-06-08 06:33:27 +09:00
Yu Watanabe
8566df791e network: rename link_acquire_conf() -> link_acquire_dynamic_conf()
To clarify it starts dynamic configuration engines e.g. DHCP clients.
2021-06-08 06:33:27 +09:00
Yu Watanabe
9710895378 network: request to configure static settings earlier
Now, all static configs should be ordered after the link gains its carrier.
So, it is not necessary to wait for that before queuing requests.
2021-06-08 06:33:27 +09:00
Yu Watanabe
40b12fa20d network: introduce request_hash_ops to dedup requests
If KeepConfiguration= or ConfigureWithoutCarrier= is set, then the same
requests may be queued.
2021-06-08 06:33:27 +09:00
Yu Watanabe
5f33159190 network: expose hash and compare functions 2021-06-08 06:33:27 +09:00
Yu Watanabe
fdeba3f5cc network: use request queue to configure IPv6 proxy NDP addresses 2021-06-08 06:33:27 +09:00
Yu Watanabe
d8350b60e0 network: move logic for setting proxy_ndp sysctl to networkd-sysctl.c 2021-06-08 06:33:27 +09:00
Yu Watanabe
14d9ab9d32 network: introduce network_adjust_ipv6_proxy_ndp() 2021-06-08 06:33:27 +09:00
Yu Watanabe
354bc760cd network: address label: use request queue to configure address labels 2021-06-08 06:33:27 +09:00
Yu Watanabe
4c0c8d1e72 network: address label: use struct in6_addr instead
Address label is for IPv6.
2021-06-08 06:33:27 +09:00
Yu Watanabe
2551b422e1 network: address label: refuse IPv4 mapped address with large prefix length
See ip6addrlbl_alloc() in net/ipv6/addrlabel.c of kernel.
2021-06-08 06:33:27 +09:00
Yu Watanabe
c3e960883f in-addr-util: introduce in6_addr_is_ipv4_mapped_address() 2021-06-08 06:33:27 +09:00
Yu Watanabe
9a038aaced network: use request queue to configure bridge MDB 2021-06-08 06:33:27 +09:00
Yu Watanabe
ff9e07838d network: rename MdbEntry -> BridgeMDB 2021-06-08 06:33:27 +09:00
Yu Watanabe
9373f5a812 test-network: fix setting name
This fixes an issue introduced by 72ffb9133d.
2021-06-08 06:33:27 +09:00
Yu Watanabe
4e0006cc4b test-network: add a testcase for UplinkInterface= for DHCP server 2021-06-08 06:33:27 +09:00
Yu Watanabe
165d7c5c42 network: introduce UplinkInterface= setting for DHCP server 2021-06-08 06:33:27 +09:00
Yu Watanabe
fb3aec45a0 network: make manager_find_uplink() uses stored route information
networkd already has all information about routes. It is not necessary
to re-read them by using local_gateways().

This also makes manager_find_uplink() take family.
2021-06-08 06:33:27 +09:00
Yu Watanabe
ab486ef4eb network: restart DHCP server on carrier gain 2021-06-08 06:33:27 +09:00
Yu Watanabe
b27e5d53f3 sd-dhcp-server: make sd_dhcp_server_start() no-op if it is already running 2021-06-08 06:33:27 +09:00
Yu Watanabe
1d28a3cf6c network: use request queue to configure DHCP server 2021-06-08 06:33:27 +09:00