network:add missing link->network checks
This commit is contained in:
parent
36131e0692
commit
b3cd04939b
41
backport-network-add-missing-link-network-checks.patch
Normal file
41
backport-network-add-missing-link-network-checks.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From b1b0b42e48303134731e017a108c6c334ef5f4c8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||||
|
Date: Tue, 17 Sep 2019 21:29:23 +0900
|
||||||
|
Subject: [PATCH] network: add missing link->network checks
|
||||||
|
|
||||||
|
When the function is called, no network file may be assigned to the
|
||||||
|
link.
|
||||||
|
---
|
||||||
|
src/network/networkd-link.c | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
|
||||||
|
index f1aeb7287e34..46d55f64dc5b 100644
|
||||||
|
--- a/src/network/networkd-link.c
|
||||||
|
+++ b/src/network/networkd-link.c
|
||||||
|
@@ -2393,9 +2393,9 @@ static int link_drop_foreign_config(Link *link) {
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (link_address_is_dynamic(link, address)) {
|
||||||
|
- if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||||
|
+ if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||||
|
continue;
|
||||||
|
- } else if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||||
|
+ } else if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (link_is_static_address_configured(link, address)) {
|
||||||
|
@@ -2435,11 +2435,11 @@ static int link_drop_foreign_config(Link *link) {
|
||||||
|
in_addr_equal(AF_INET6, &route->dst, &(union in_addr_union) { .in6 = {{{ 0xff,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }}} }))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- if (route->protocol == RTPROT_STATIC &&
|
||||||
|
+ if (route->protocol == RTPROT_STATIC && link->network &&
|
||||||
|
FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- if (route->protocol == RTPROT_DHCP &&
|
||||||
|
+ if (route->protocol == RTPROT_DHCP && link->network &&
|
||||||
|
FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
|
||||||
|
continue;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
Name: systemd
|
Name: systemd
|
||||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||||
Version: 243
|
Version: 243
|
||||||
Release: 45
|
Release: 46
|
||||||
License: MIT and LGPLv2+ and GPLv2+
|
License: MIT and LGPLv2+ and GPLv2+
|
||||||
Summary: System and Service Manager
|
Summary: System and Service Manager
|
||||||
|
|
||||||
@ -137,6 +137,7 @@ Patch0089: backport-stat-util-add-stat_inode_unmodified-helper-that-chec.pa
|
|||||||
Patch0090: backport-basic-stat-util-make-mtime-check-stricter-and-use-en.patch
|
Patch0090: backport-basic-stat-util-make-mtime-check-stricter-and-use-en.patch
|
||||||
Patch0091: backport-udev-make-algorithm-that-selects-highest-priority-de.patch
|
Patch0091: backport-udev-make-algorithm-that-selects-highest-priority-de.patch
|
||||||
Patch0092: backport-tentatively-ignore-FORCERENEW-command.patch
|
Patch0092: backport-tentatively-ignore-FORCERENEW-command.patch
|
||||||
|
Patch0093: backport-network-add-missing-link-network-checks.patch
|
||||||
|
|
||||||
#openEuler
|
#openEuler
|
||||||
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
||||||
@ -1524,6 +1525,9 @@ fi
|
|||||||
%exclude /usr/share/man/man3/*
|
%exclude /usr/share/man/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 9 2021 yangmingtai <yangmingtai@huawei.com> - 243-46
|
||||||
|
- fix network coredump after install cloud-init
|
||||||
|
|
||||||
* Mon Aug 16 2021 yangmingtai <yangmingtai@huawei.com> - 243-45
|
* Mon Aug 16 2021 yangmingtai <yangmingtai@huawei.com> - 243-45
|
||||||
- Type:CVE
|
- Type:CVE
|
||||||
- ID:CVE-2020-13529
|
- ID:CVE-2020-13529
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user