Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1905210

Summary: lldpad sends shutdown frame when in 'receive-only' mode
Product: Red Hat Enterprise Linux 7 Reporter: Matthew Whitehead <mwhitehe>
Component: lldpadAssignee: Aaron Conole <aconole>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1905224 (view as bug list) Environment:
Last Closed: 2021-01-11 20:15:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1905224    

Description Matthew Whitehead 2020-12-07 18:19:14 UTC
Description of problem:

In lldp/agent.c clean_lldp_agents(), the function always sends a shutdown frame without checking if the daemon is in 'receive-only' mode. 

This causes problems with network switches, making them unavailable for several minutes.

Version-Release number of selected component (if applicable): RHEL 7.4


How reproducible: 100%


Steps to Reproduce:
1. Start lldpad in receive-only mode.
2. Halt lldpad, observe shutdown frames being sent on network.
3.

Actual results: Switches spend several minutes reconfiguring, interrupting network flow.


Expected results: Switches should not see shutdown frame and should continue running uninterrupted.


Additional info:

Comment 2 Aaron Conole 2020-12-07 18:25:46 UTC
    diff --git a/lldp/tx.c b/lldp/tx.c
    index 1b95208..fb75f40 100644
    --- a/lldp/tx.c
    +++ b/lldp/tx.c
    @@ -332,6 +332,10 @@ void process_tx_idle(UNUSED struct lldp_agent *agent)
     
     void process_tx_shutdown_frame(struct port *port, struct lldp_agent *agent)
     {
    +       if (agent->adminStatus != enabledRxTx &&
    +           agent->adminStatus != enabledTxOnly) {
    +               return;
    +       }
            if (agent->timers.txShutdownWhile == 0) {
                    if (mibConstrShutdownLLDPDU(port, agent))
                            txFrame(port, agent);

Proposed patch to prevent sending the shutdown frame.

Comment 3 Aaron Conole 2020-12-07 20:11:59 UTC
The proposed patch isn't good enough.  We need to actually do the check for a state transition.  Basically, when we transition
the port from rxtx to rxonly, then we also need to transmit the final ttl=0 value to purge remote endpoints.

Still, I think it's doable in the tx.c code, since the state transitions are tracked there.

Comment 4 Aaron Conole 2020-12-08 18:29:11 UTC
https://github.com/intel/openlldp/pull/69 sent upstream.

Comment 5 Aaron Conole 2021-01-11 20:15:06 UTC
This will not be resolved as part of RHEL7