!20 Fix null dereference in findLBEndpointSandbox
From: @guojunding Reviewed-by: @zmr_2020, @xuxuepeng Signed-off-by: @xuxuepeng
This commit is contained in:
commit
7c10d44091
37
backport-Fix-null-dereference-in-findLBEndpointSandbox.patch
Normal file
37
backport-Fix-null-dereference-in-findLBEndpointSandbox.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 90990763aa5895d00934ef0924b10ca7b39821eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Scott Percival <scottp@lastyard.com>
|
||||||
|
Date: Tue, 22 Sep 2020 14:56:03 +0800
|
||||||
|
Subject: [PATCH] service_linux: Fix null dereference in findLBEndpointSandbox
|
||||||
|
|
||||||
|
Signed-off-by: Scott Percival <scottp@lastyard.com>
|
||||||
|
(cherry picked from commit 2fe6352d2420502217c3249db8c03c0d52287069)
|
||||||
|
Signed-off-by: Ameya Gawde <agawde@mirantis.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
service_linux.go | 8 +++++---
|
||||||
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/service_linux.go libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-b/service_linux.go
|
||||||
|
index 3ffa607..bb0074f 100644
|
||||||
|
--- libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/service_linux.go
|
||||||
|
+++ libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9-b/service_linux.go
|
||||||
|
@@ -67,11 +67,13 @@ func (n *network) findLBEndpointSandbox() (*endpoint, *sandbox, error) {
|
||||||
|
if !ok {
|
||||||
|
return nil, nil, fmt.Errorf("Unable to get sandbox for %s(%s) in for %s", ep.Name(), ep.ID(), n.ID())
|
||||||
|
}
|
||||||
|
- ep = sb.getEndpoint(ep.ID())
|
||||||
|
- if ep == nil {
|
||||||
|
+ var sep *endpoint
|
||||||
|
+ sep = sb.getEndpoint(ep.ID())
|
||||||
|
+ if sep == nil {
|
||||||
|
return nil, nil, fmt.Errorf("Load balancing endpoint %s(%s) removed from %s", ep.Name(), ep.ID(), n.ID())
|
||||||
|
}
|
||||||
|
- return ep, sb, nil
|
||||||
|
+ return sep, sb, nil
|
||||||
|
+
|
||||||
|
}
|
||||||
|
|
||||||
|
// Searches the OS sandbox for the name of the endpoint interface
|
||||||
|
--
|
||||||
|
2.9.3.windows.1
|
||||||
|
|
||||||
@ -1,11 +1,14 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
Name: libnetwork
|
Name: libnetwork
|
||||||
Version: 0.8.0.dev.2
|
Version: 0.8.0.dev.2
|
||||||
Release: 102
|
Release: 103
|
||||||
Summary: Proxy used for docker port mapping
|
Summary: Proxy used for docker port mapping
|
||||||
License: Apache License 2.0
|
License: Apache License 2.0
|
||||||
URL: https://github.com/docker/libnetwork
|
URL: https://github.com/docker/libnetwork
|
||||||
Source: libnetwork-d00ceed.tar.gz
|
Source: libnetwork-d00ceed.tar.gz
|
||||||
|
|
||||||
|
Patch1: backport-Fix-null-dereference-in-findLBEndpointSandbox.patch
|
||||||
|
|
||||||
BuildRequires: golang >= 1.8.3
|
BuildRequires: golang >= 1.8.3
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
Provides: docker-proxy
|
Provides: docker-proxy
|
||||||
@ -15,6 +18,7 @@ Obsoletes: docker-proxy
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -c -n libnetwork
|
%setup -c -n libnetwork
|
||||||
|
%patch1 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
|
cd libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9
|
||||||
@ -41,6 +45,9 @@ install -p -m 755 libnetwork-d00ceed44cc447c77f25cdf5d59e83163bdcb4c9/docker-pro
|
|||||||
%{_bindir}/docker-proxy
|
%{_bindir}/docker-proxy
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 18 2024 guojunding <guojunding@kylinos.cn> - 0.8.0.dev.2-103
|
||||||
|
- Fix null dereference in findLBEndpointSandbox
|
||||||
|
|
||||||
* Thu Mar 18 2021 xiadanni<xiadanni1@huawei.com> 0.8.0.dev.2-102
|
* Thu Mar 18 2021 xiadanni<xiadanni1@huawei.com> 0.8.0.dev.2-102
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- Id:NA
|
- Id:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user