Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lldp: correctly increase discarded count
Upstream commit:
    commit 32f0deeebc9172c3f5f4a4d02aab32e6904947f6
    Date: Sat, 18 Feb 2017 20:11:47 +0100

    lldpd: correctly increase discarded count

    When a frame cannot be decoded but has been guessed, increase the
    discarded count.

    Fix lldpd/lldpd#223

Fixes: be53a5c ("auto-attach: Initial support for Auto-Attach standard")
Co-authored-by: Fabrizio D'Angelo <fdangelo@redhat.com>
Signed-off-by: Fabrizio D'Angelo <fdangelo@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
  • Loading branch information
2 people authored and igsilya committed Nov 16, 2020
1 parent 5d2a8c2 commit 68cfe35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/lldp/lldpd.c
Expand Up @@ -244,6 +244,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,

if (s < sizeof(struct eth_header) + 4) {
/* Too short, just discard it */
hw->h_rx_discarded_cnt++;
return;
}

Expand Down Expand Up @@ -284,6 +285,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,
VLOG_DBG("function for %s protocol did not "
"decode this frame",
cfg->g_protocols[i].name);
hw->h_rx_discarded_cnt++;
return;
}
chassis->c_protocol = port->p_protocol = cfg->g_protocols[i].mode;
Expand Down

0 comments on commit 68cfe35

Please sign in to comment.