Skip to content

Commit 7c363f5

Browse files
authored
[ledd] prevent led crash on recirc port event (#232)
Description Prevent ledd crash when an event on recirc port happens Motivation and Context A recirculation port is not a physical interface tied to a xcvr Calling the led change event on such a port could lead to a ledd crash How Has This Been Tested? This change was applied to running switch with its dependency #9471 Verified that ledd runs without crashing
1 parent e9ccd82 commit 7c363f5

File tree

1 file changed

+2
-2
lines changed
  • sonic-ledd/scripts

1 file changed

+2
-2
lines changed

sonic-ledd/scripts/ledd

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import sys
1010

1111
from sonic_py_common import daemon_base
1212
from sonic_py_common import multi_asic
13-
from sonic_py_common.interface import backplane_prefix, inband_prefix
13+
from sonic_py_common.interface import backplane_prefix, inband_prefix, recirc_prefix
1414
from swsscommon import swsscommon
1515

1616
#============================= Constants =============================
@@ -96,7 +96,7 @@ class DaemonLedd(daemon_base.DaemonBase):
9696
fvp_dict = dict(fvp)
9797

9898
if op == "SET" and "oper_status" in fvp_dict:
99-
if not key.startswith(backplane_prefix()) and not key.startswith(inband_prefix()):
99+
if not key.startswith((backplane_prefix(), inband_prefix(), recirc_prefix())):
100100
self.led_control.port_link_state_change(key, fvp_dict["oper_status"])
101101
else:
102102
return 4

0 commit comments

Comments
 (0)