import CS lldpad-1.1.1-4.gitf1dd9eb.el9
This commit is contained in:
parent
f8594eca49
commit
1b88c2c41b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/lldpad-1.1.0.tar.gz
|
||||
SOURCES/lldpad-1.1.1.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
470b646858b16e80266edd31ef4c92c92b5256e4 SOURCES/lldpad-1.1.0.tar.gz
|
||||
c52c432a8745990c2cbc3f934ecd45bfa7f84f6a SOURCES/lldpad-1.1.1.tar.gz
|
||||
|
5873
SOURCES/0001-patch-to-latest.patch
Normal file
5873
SOURCES/0001-patch-to-latest.patch
Normal file
File diff suppressed because it is too large
Load Diff
101
SOURCES/0002-do-not-remove-config.patch
Normal file
101
SOURCES/0002-do-not-remove-config.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From cfef0032247f9a3950a9909d59db88e948741ee3 Mon Sep 17 00:00:00 2001
|
||||
From: Hangbin Liu <liuhangbin@gmail.com>
|
||||
Date: Wed, 9 Oct 2024 03:53:16 +0000
|
||||
Subject: [PATCH 2/2] lldpad: do not remove config when stopping lldpad
|
||||
|
||||
When lldpad is terminated by systemd or kill, the remove_all_adapters()
|
||||
function is called. However, this function is intended to release port
|
||||
resources, and the configuration file should not be destroyed. We only
|
||||
need to remove the port when it is explicitly deleted. Otherwise, all
|
||||
configurations will be lost when lldpad is stopped.
|
||||
|
||||
Fixes: a75e35a0cb36 ("lldpad: remove device from config file when ports are removed")
|
||||
Reported-by: Fei Liu <feliu@redhat.com>
|
||||
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|
||||
Signed-off-by: Aaron Conole <aconole@redhat.com>
|
||||
---
|
||||
config.c | 2 +-
|
||||
event_iface.c | 2 +-
|
||||
lldp/ports.c | 5 +++--
|
||||
lldp/ports.h | 2 +-
|
||||
lldpad.c | 2 +-
|
||||
5 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/config.c b/config.c
|
||||
index 13ee7aa7ba47..e046f94fe911 100644
|
||||
--- a/config.c
|
||||
+++ b/config.c
|
||||
@@ -135,7 +135,7 @@ void scan_port(UNUSED void *eloop_data, UNUSED void *user_ctx)
|
||||
}
|
||||
next = port->next;
|
||||
if (!found)
|
||||
- remove_port(port->ifname);
|
||||
+ remove_port(port->ifname, true);
|
||||
}
|
||||
|
||||
/* Walk port list looking for devices that should have been added
|
||||
diff --git a/event_iface.c b/event_iface.c
|
||||
index 916bf4b4cbe8..65f1f83bf8e7 100644
|
||||
--- a/event_iface.c
|
||||
+++ b/event_iface.c
|
||||
@@ -297,7 +297,7 @@ static void event_if_decode_nlmsg(int route_type, void *data, int len)
|
||||
if (route_type == RTM_DELLINK) {
|
||||
LLDPAD_INFO("%s: %s: device removed!\n",
|
||||
__func__, device_name);
|
||||
- remove_port(device_name);
|
||||
+ remove_port(device_name, true);
|
||||
}
|
||||
break;
|
||||
case IF_OPER_DORMANT:
|
||||
diff --git a/lldp/ports.c b/lldp/ports.c
|
||||
index 3eab71f8eff1..284f8f6c7108 100644
|
||||
--- a/lldp/ports.c
|
||||
+++ b/lldp/ports.c
|
||||
@@ -297,7 +297,7 @@ fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-int remove_port(const char *ifname)
|
||||
+int remove_port(const char *ifname, bool remove_config)
|
||||
{
|
||||
int ifindex = get_ifidx(ifname);
|
||||
struct port *port; /* Pointer to port to remove */
|
||||
@@ -356,7 +356,8 @@ int remove_port(const char *ifname)
|
||||
|
||||
LIST_REMOVE(agent, entry);
|
||||
|
||||
- remove_config_device(ifname, agent->type);
|
||||
+ if (remove_config)
|
||||
+ remove_config_device(ifname, agent->type);
|
||||
|
||||
free(agent);
|
||||
}
|
||||
diff --git a/lldp/ports.h b/lldp/ports.h
|
||||
index 21280e0ef0e2..a5006fa86a74 100644
|
||||
--- a/lldp/ports.h
|
||||
+++ b/lldp/ports.h
|
||||
@@ -97,7 +97,7 @@ extern struct port *porthead;
|
||||
extern "C" {
|
||||
#endif
|
||||
struct port *add_port(int ifindex, const char *);
|
||||
-int remove_port(const char *);
|
||||
+int remove_port(const char *, bool remove_config);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
diff --git a/lldpad.c b/lldpad.c
|
||||
index 65e92c703c42..ddc8b631e0e5 100644
|
||||
--- a/lldpad.c
|
||||
+++ b/lldpad.c
|
||||
@@ -167,7 +167,7 @@ static void remove_all_adapters(void)
|
||||
|
||||
for (port = porthead; port; port = next) {
|
||||
next = port->next;
|
||||
- remove_port(port->ifname);
|
||||
+ remove_port(port->ifname, false);
|
||||
}
|
||||
|
||||
return;
|
||||
--
|
||||
2.39.5 (Apple Git-154)
|
||||
|
@ -1,26 +1,40 @@
|
||||
%global _default_patch_fuzz 2
|
||||
|
||||
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
|
||||
%global _hardened_build 1
|
||||
|
||||
%global checkout 85e5583
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/
|
||||
%global forgeurl https://github.com/intel/openlldp/
|
||||
%global branch branch-1.1
|
||||
%global commit f1dd9eb961fab06723d2bedb2f7e2b81e45ee9ab
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global forgesetupargs -n openlldp-%{version} -p1
|
||||
|
||||
Name: lldpad
|
||||
Version: 1.1.0
|
||||
Release: 4.git%{checkout}%{?dist}
|
||||
Version: 1.1.1
|
||||
Release: 4.git%{shortcommit}%{?dist}
|
||||
Summary: Intel LLDP Agent
|
||||
License: GPLv2
|
||||
URL: http://open-lldp.org/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
%forgemeta
|
||||
|
||||
BuildRequires: automake autoconf libtool
|
||||
BuildRequires: flex >= 2.5.33
|
||||
BuildRequires: kernel-headers >= 2.6.32
|
||||
BuildRequires: libconfig-devel >= 1.3.2
|
||||
License: GPL-2.0-only
|
||||
URL: %{forgeurl}
|
||||
Source0: %{forgesource}#/%{name}-%{version}.tar.gz
|
||||
# This is the upgrade package to latest upstream
|
||||
# When 1.1.2 or later is released, simply remove this
|
||||
# patch and generate a new one.
|
||||
Patch1: 0001-patch-to-latest.patch
|
||||
Patch2: 0002-do-not-remove-config.patch
|
||||
|
||||
BuildRequires: automake autoconf
|
||||
BuildRequires: flex
|
||||
BuildRequires: kernel-headers
|
||||
BuildRequires: libconfig-devel
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: make
|
||||
Requires: libconfig
|
||||
Requires: libnl3
|
||||
Requires: readline
|
||||
|
||||
Requires(post): systemd
|
||||
@ -42,7 +56,7 @@ The %{name}-devel package contains header files for developing applications
|
||||
that use %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%forgeautosetup
|
||||
|
||||
%build
|
||||
./bootstrap.sh
|
||||
@ -83,9 +97,32 @@ rm -f %{buildroot}%{_libdir}/liblldp_clif.la
|
||||
%{_libdir}/liblldp_clif.so
|
||||
|
||||
%changelog
|
||||
* Mon Jan 20 2025 Hangbin Liu <haliu@redhat.com> - 1.1.1-4.gitf1dd9eb
|
||||
- do not remove config when stopping lldpad (RHEL-61874)
|
||||
|
||||
* Mon Sep 9 2024 Hangbin Liu <haliu@redhat.com> - 1.1.1-3.gitf1dd9eb
|
||||
- Rebase to latest upstream code
|
||||
- Remove interface configure if the interface deleted (RHEL-13242)
|
||||
- Fix strdup is not freed (RHEL-37524)
|
||||
- Fix using uninitialized value (RHEL-37548)
|
||||
- Fix copy past error (RHEL-37679)
|
||||
- Fix resource leak (RHEL-37685)
|
||||
|
||||
* Wed Sep 4 2024 Hangbin Liu <haliu@redhat.com> - 1.1.1-2.gitf1dd9eb
|
||||
- Update gating test
|
||||
|
||||
* Wed Sep 4 2024 Hangbin Liu <haliu@redhat.com> - 1.1.1-1.gitf1dd9eb
|
||||
- Rebase to 1.1.1
|
||||
- Fix program segfaults after entering the quit command (RHEL-5814)
|
||||
- Fix setting interface status not survive reboot (RHEL-5824)
|
||||
- Fix some other bugs
|
||||
|
||||
* Wed Nov 15 2023 Hangbin Liu <haliu@redhat.com> - 1.1.0-5.git85e5583
|
||||
- Convert the license tag to SPDX format (RHELMISC-1358)
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.0-4.git85e5583
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
- Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.1.0-3.git85e5583
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
Loading…
Reference in New Issue
Block a user