meta-starlingx/meta-stx-integ/recipes-daemons/lldpd/files/0002-Clear-station-bit-if-any-other-capability-is-enabled.patch
Saul Wold 6096f1e3aa lldpd: Move meta-stx-integ
The integration layer is the place to put StarlingX changes

Signed-off-by: Saul Wold <sgw@linux.intel.com>
2020-05-17 16:00:29 -07:00

28 lines
1013 B
Diff

From 461e728e8bd71529c09a113f2610766be61aa50a Mon Sep 17 00:00:00 2001
From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
Date: Mon, 24 Feb 2020 05:06:57 -0800
Subject: [PATCH 2/2] Clear station bit if any other capability is enabled
From stx.3.0 b2ed14edc66c7876cd9239a346b92630403e996c
---
src/daemon/interfaces.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/daemon/interfaces.c b/src/daemon/interfaces.c
index d004c70..b870a46 100644
--- a/src/daemon/interfaces.c
+++ b/src/daemon/interfaces.c
@@ -328,6 +328,9 @@ interfaces_helper_chassis(struct lldpd *cfg,
if ((LOCAL_CHASSIS(cfg)->c_cap_available & LLDP_CAP_STATION) &&
(LOCAL_CHASSIS(cfg)->c_cap_enabled == 0))
LOCAL_CHASSIS(cfg)->c_cap_enabled = LLDP_CAP_STATION;
+ else if (LOCAL_CHASSIS(cfg)->c_cap_enabled != LLDP_CAP_STATION)
+ LOCAL_CHASSIS(cfg)->c_cap_enabled &= ~LLDP_CAP_STATION;
+
if (LOCAL_CHASSIS(cfg)->c_id != NULL &&
LOCAL_CHASSIS(cfg)->c_id_subtype == LLDP_CHASSISID_SUBTYPE_LLADDR)
--
2.23.0