Commit Graph

1157 Commits

Author SHA1 Message Date
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
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
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
3be64aa462 network: do not set invalid MAC address for non-ethernet interface 2022-07-14 06:52:07 +09:00
David Tardon
e2341b6bc3 tree-wide: allow ASCII fallback for → in logs 2022-06-28 12:50:43 +02:00
Zbigniew Jędrzejewski-Szmek
c71384a9ee basic/in-addr-util: add IN_ADDR_PREFIX_TO_STRING 2022-06-06 09:52:52 +02:00
Zbigniew Jędrzejewski-Szmek
8458ca26c1 networkd: reword debug messages
"left from <something>" is not correct. "left <something>" would be the
usual form, but "left master interface" is not clear at all. So reword
those messages totally.

Follow-up for 3881fd406b.
2022-05-16 19:50:26 +02:00
Yu Watanabe
3881fd406b tree-wide: fix typo 2022-05-14 04:58:47 +09:00
Yu Watanabe
b732606950 network: automatically determine timeout of waiting for carrier regain
The commit 6706ce2fd2 made
IgnoreCarrierLoss= setting also take timespan, to make users handle
issues like #18738 or #20887. But still users needed to explicitly set
a timespan.

This makes networkd automatically determine the timeout when the
situations #18738 or #19832 is detected. Unfortunately, still users have
issue #20887 need to specify a value.

Closes #19832.
2022-03-31 09:29:42 +09:00
Lennart Poettering
ba4e0427e9 time-util: assume CLOCK_BOOTTIME always exists
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work
with timerfd in kernel 3.15 (i.e. back in 2014), let's require support
for it now.

This will raise our baseline only modestly from 3.13 → 3.15.
2022-03-28 16:55:41 +02:00
Yu Watanabe
cb8453cc51 network: sriov: use request queue to configure SR-IOV virtual functions 2022-03-23 16:48:36 +09:00
Yu Watanabe
de010b0b2e strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
2022-03-19 08:33:33 +09:00
Yu Watanabe
e26d3d407c network: make Request object take Manager*
Previously, even though all Request object are owned by Manager, they
do not have direct reference to Manager, but through Link or NetDev
object. But, as Link or NetDev can be NULL, we need to conditionalize
how to access Manager from Request with the type of the request.
This makes the way simpler, as now Request object has direct reference
to Manager.

This also rename request_drop() -> request_detach(), as in the previous
commit, the reference counter is introduced, so even if a reference of
a Request object from Manager is dropped, the object may still alive.
The naming `request_drop()` sounds the object will freed by the
function. But it may not. And `request_detach()` suggests the object
will not be managed by Manager any more, and I think it is more
appropreate.

This is just a cleanup, and should not change any behavior.
2022-03-11 14:20:31 +09:00
Yu Watanabe
3a67b8bb0d network: traffic control: drop meta from QDisc and TClass
Since #22248, it is not necessary to manage QDisc and TClass in same Set
or Hashmap. Let's manage them independently.
2022-02-26 14:58:01 +09:00
Yu Watanabe
b93ce59e51 network: drop unused flag and counter 2022-02-26 05:49:52 +09:00
Yu Watanabe
9aa2585e2f network: assign corresponding NetDev object to Link 2022-02-26 05:49:52 +09:00
Yu Watanabe
63b5e05ff9 Merge pull request #22545 from yuwata/network-match-kind
network, udev: introduce Kind= setting in [Match] section
2022-02-18 01:20:18 +09:00
Yu Watanabe
65022cd7ab network,udev/net: add Kind= settings in [Match] section
This may be useful for writing .network or .link files matching with
virtual interfaces.

Closes #22541.
2022-02-17 23:10:26 +09:00
Yu Watanabe
e1658632ae network: call ethtool after link is initialized by udevd
Fixes #22538.
2022-02-17 18:55:43 +09:00
Yu Watanabe
82f52245ba network: use udev_available() where applicable 2022-02-17 18:55:43 +09:00