Yu Watanabe
af7a86b8a6
network/tuntap: save tun or tap file descriptor in fd store
2022-08-16 21:57:35 +09:00
Yu Watanabe
f8b7c17764
network/tuntap: introduce KeepCarrier= setting
...
Closes #24267 .
2022-08-16 21:57:31 +09:00
Yu Watanabe
8f388c4e46
network/tuntap: code cleanups
...
- merge unnecessarily split functions,
- drop unnecessary initializations,
- tighten variable scopes,
- introduce TUNTAP() helper function.
2022-08-16 21:49:04 +09:00
Yu Watanabe
3f504b892b
network/bridge: fix UseBPDU= and AllowPortToBeRoot=
...
Fixes bugs caused by 7f9915f0de .
Fixes #24268 .
2022-08-14 06:56:05 +09:00
williamsumendap
d277530616
network: replace usage of sd_bus_call_method_async() to bus_call_method_async() ( #24290 )
2022-08-13 03:28:29 +09:00
Richard Phibel
ead3a3fc87
config-parser: Add list of drop-in files as return argument of config_parse_many
...
This will be used to save the list of drop-in files for each partition
2022-08-12 12:48:29 +02:00
Yu Watanabe
5c19169fe9
tree-wide: fix typo
2022-08-10 19:43:38 +09:00
Yu Watanabe
9b2a2e06c4
network/teql: wait for corresponding teql interface to be available
2022-08-09 19:37:49 +09:00
Yu Watanabe
21261ea231
network/qdisc: introduce is_ready() in qdisc vtable
...
Preparation for next commit.
2022-08-09 19:37:49 +09:00
gtwang01
b607fd3f32
tree-wide: use bus locator ( #24252 )
...
This modifies some sd_bus calls to equivalent bus calls.
2022-08-09 16:19:09 +09:00
Yu Watanabe
7fddb9704f
dhcp4: stop client before updating MAC address
2022-08-06 04:53:36 +09:00
Yu Watanabe
e33232d405
network: also check SR-IOV PF port and other VF ports before configuring
...
When a PF port becomes down (this can happens e.g. the PF port is joining
a bond interface), some drivers make its VF ports also become down, and
may cause failures in configuring VF ports.
Similary, when a VF port become down, some drivers make its PF port and
other VF ports down.
Let's configure SR-IOV ports (both PF and VFs) after all link-layer
settings of all ports being applied.
Fixes #23315 .
2022-08-05 21:49:27 +09:00
Yu Watanabe
b0ff6dea38
network: manage SR-IOV PF and VF ports
2022-08-05 21:49:27 +09:00
Yu Watanabe
00117f8811
network: split out link_is_ready_to_create_stacked_netdev()
...
Preparation for later commits.
2022-08-05 21:49:27 +09:00
Yu Watanabe
4b482e8bf4
network: check link state with link_is_ready_to_configure() before configuring DHCP client or friends
...
Otherwise, DHCP client or friends may started before link-layer properties,
e.g. MAC address, being configured or the link being activated.
2022-08-05 21:49:27 +09:00
Yu Watanabe
2fd3908b5c
network: drop carrier check for unmanaged interface from link_is_ready_to_configure()
...
Preparation for later commits. No functional change.
2022-08-05 21:49:27 +09:00
Yu Watanabe
d8d4db58ca
network: refuse to configure anything on pending or initialized state
2022-08-05 21:49:27 +09:00
Yu Watanabe
53c2e3b9ba
network: unset master ifindex only when necessary
2022-08-05 21:49:27 +09:00
Yu Watanabe
4d79af57ca
network: wiphy: use ERRNO_IS_DEVICE_ABSENT()
2022-08-05 21:49:27 +09:00
Yu Watanabe
68a52f5973
sd-device: introduce sd_device_new_child()
2022-08-05 21:49:23 +09:00
Yu Watanabe
bd7e0a3f1c
network: make link_may_have_ipv6ll() optionally check Multicast= setting
...
Fixes the IPv6LL issue in #23197 .
2022-08-02 03:35:00 +09:00
Yu Watanabe
5fb5fae933
network: fix possible NULL-pointer dereference
2022-08-02 03:32:55 +09:00
Yu Watanabe
e0c0cd49e5
network: do not try to start ipv4acd on non-supported interfaces
...
Fixes IPv4LL issue reported in #23197 .
2022-08-02 03:06:21 +09:00
Yu Watanabe
29104ded1c
network: split link_ipv4ll_enabled() into two
...
And move it from networkd-link.[ch] to relevant files.
2022-08-02 03:02:48 +09:00
Yu Watanabe
2d3d0e8f7d
network: drop doubled semicolon
2022-08-02 02:44:37 +09:00
Yu Watanabe
a9d2d037ee
network: do not try to bring up wifi interface if rfkill is active
...
This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---
Fixes #23649 .
2022-07-23 20:55:03 +09:00
Yu Watanabe
8642e04b78
network: also assign rfkill device to Wiphy object
...
Preparation for later commits.
2022-07-23 20:55:03 +09:00
Yu Watanabe
c49d536295
network: assign corresponding sd-device object to Wiphy object
...
As an analogy for Link object, let's each Wiphy object has the
corresponding sd-device object. The sd-device object will be used in
later commits.
2022-07-23 20:55:02 +09:00
Yu Watanabe
fc85b32302
network: set wiphy name in wiphy_new()
...
Then, we can assume all Wiphy objects managed by Manager has both valid
index and name.
2022-07-23 20:53:06 +09:00
Yu Watanabe
71cdfe16aa
network: add TODO about interface renaming
2022-07-23 20:04:28 +09:00
Yu Watanabe
75255a8d43
network: unref sd-device object assigned to Link on remove uevent
...
Otherwise, outdated device information may be used in a short timespan.
2022-07-23 20:04:28 +09:00
Yu Watanabe
1fd3ac1eef
network: introduce a tiny wrapper for manager_udev_process_link()
...
Preparation for later commits.
2022-07-23 20:04:22 +09:00
Yu Watanabe
8de56fb3e0
network: rename Link.sd_device -> Link.dev
2022-07-23 20:00:44 +09:00
Yu Watanabe
853188db90
network: use device_unref_and_replace()
2022-07-23 08:17:43 +09:00
Yu Watanabe
b05e52000b
network: do not silently stop to process configuration on activation failure
...
Previously, if activation failed, link did not enter the failed state,
but still Link.activated flag not set. Hence, nothing processed even if
the interface is manually brought up later.
Partially fixes #23649 .
2022-07-23 08:11:36 +09:00
Yu Watanabe
50ee1fec3a
network: dhcp6: re-introduce RapidCommit= setting
...
Previous implementation of disabling rapid commit was broken, and
dropped by 308d01f3c4 .
Let's re-introduce the option in the correct way, as some servers seem
to return borked message when the solicit message contain the rapid
commit option.
Closes #24065 .
2022-07-22 21:28:20 +09:00
Luca Boccassi
9b9ddaf09d
Merge pull request #24001 from yuwata/network-lifetime-fix
...
network: fixes for lifetime handling
2022-07-18 10:02:02 +01:00
Lennart Poettering
4f80cfca5e
pid1: add mechanism for conditionalizing units/network/netdev/link based on credentials passed in
...
This is useful when provisioning systems via nspawn/qemu and running
specific services only if specific data is passed into the system.
2022-07-15 10:53:45 +02:00
Yu Watanabe
d3efcd2def
network: refuse 169.254.0.0/24 and 169.254.255.0/24 for IPv4LLStartAddress=
...
Follow-up for #23927 .
2022-07-15 03:37:09 +09:00
Yu Watanabe
c1dd250f18
Merge pull request #23927 from AndreKalb/feature/ipv4-link-local-start-address
...
network: Feature IPv4 link-local start address
2022-07-15 03:21:26 +09:00
Andre Kalb
59c272316c
sd-ipv4ll/networkd: Try to select an IPv4 link-local start address
2022-07-14 14:35:42 +02:00
Yu Watanabe
b9e4ec500e
network: refuse to configure address or route with 0 valid lifetime
...
Fixes #23625 .
2022-07-14 21:00:05 +09:00
Yu Watanabe
5235d73960
network: fix infinite lifetime handling
2022-07-14 20:56:41 +09:00
Yu Watanabe
def4741bd7
network: use sd_event_now()
2022-07-14 20:55:24 +09:00
Andre Kalb
34b63c9e45
network: Add support to select an IPv4 link-local start address
2022-07-13 23:57:18 +02:00
Yu Watanabe
3be64aa462
network: do not set invalid MAC address for non-ethernet interface
2022-07-14 06:52:07 +09:00
Yu Watanabe
56bb67180a
network: NDisc does not require MAC address
...
This effectively revert ba4c7184b3 .
Fixes #23546 .
2022-07-14 06:52:07 +09:00
Yu Watanabe
7e2f684e1f
network: dhcp4: disable DHCPv4 client on interfaces with non-supported types
...
Replaces f42d41cc5f .
2022-07-14 06:52:07 +09:00
Yu Watanabe
8f4f630731
Revert "network: configure DHCP clients after MAC address is assigned"
...
This reverts commit f42d41cc5f .
DHCPv6 client does not require MAC address.
DHCPv4 client will be handled in a different way in a later commit.
Partially fixes #23546 .
2022-07-14 06:51:59 +09:00
Yu Watanabe
d5ad2ec1d4
network: drop redundant warning
...
If file is world readable, then `read_full_file_full()` will warn
about that.
2022-07-09 01:09:23 +01:00