Annotation of /trunk/systemd/patches/systemd-242-network-fix-assertion-when-link-get-carrier.patch
Parent Directory | Revision Log
Revision 3368 -
(hide annotations)
(download)
Tue Jul 9 11:20:22 2019 UTC (5 years, 2 months ago) by niro
File size: 1534 byte(s)
Tue Jul 9 11:20:22 2019 UTC (5 years, 2 months ago) by niro
File size: 1534 byte(s)
-added systemd-242 upstream patches
1 | niro | 3368 | From b9ea3d2e47b3741f3f46ba9c5e19640136933b71 Mon Sep 17 00:00:00 2001 |
2 | From: Yu Watanabe <watanabe.yu+github@gmail.com> | ||
3 | Date: Fri, 3 May 2019 01:13:10 +0200 | ||
4 | Subject: [PATCH] network: fix assertion when link get carrier | ||
5 | |||
6 | This fixes a bug introduced by bd08ce56156751d58584a44e766ef61340cdae2d. | ||
7 | When link is in LINK_STATE_INITIALIZED, `Link::network` may not be | ||
8 | set yet. | ||
9 | |||
10 | Fixes #12452. | ||
11 | --- | ||
12 | src/network/networkd-link.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c | ||
16 | index 3e22efb92a6..c56b4dfceb3 100644 | ||
17 | --- a/src/network/networkd-link.c | ||
18 | +++ b/src/network/networkd-link.c | ||
19 | @@ -3734,7 +3734,7 @@ int link_ipv6ll_gained(Link *link, const struct in6_addr *address) { | ||
20 | link->ipv6ll_address = *address; | ||
21 | link_check_ready(link); | ||
22 | |||
23 | - if (!IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_UNMANAGED, LINK_STATE_FAILED)) { | ||
24 | + if (IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) { | ||
25 | r = link_acquire_ipv6_conf(link); | ||
26 | if (r < 0) { | ||
27 | link_enter_failed(link); | ||
28 | @@ -3750,7 +3750,7 @@ static int link_carrier_gained(Link *link) { | ||
29 | |||
30 | assert(link); | ||
31 | |||
32 | - if (!IN_SET(link->state, LINK_STATE_PENDING, LINK_STATE_UNMANAGED, LINK_STATE_FAILED)) { | ||
33 | + if (IN_SET(link->state, LINK_STATE_CONFIGURING, LINK_STATE_CONFIGURED)) { | ||
34 | r = link_acquire_conf(link); | ||
35 | if (r < 0) { | ||
36 | link_enter_failed(link); |