diff options
author | Vincent Bernat <vincent@bernat.im> | 2020-11-12 19:54:54 -0500 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-11-16 17:43:51 +0100 |
commit | 189e476103d517338a15524e2694b38a5d7ceeba (patch) | |
tree | d0bceff07a3decdd224c52cdce5ca4dff567de9f | |
parent | 6a80b27ce5a69875e64ad1c88a80a845831c8be8 (diff) | |
download | openvswitch-189e476103d517338a15524e2694b38a5d7ceeba.tar.gz |
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 https://github.com/vincentbernat/lldpd/issues/223
Fixes: be53a5c447c3 ("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>
-rw-r--r-- | lib/lldp/lldpd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c index 71f7e44b6..6ed85c6a1 100644 --- a/lib/lldp/lldpd.c +++ b/lib/lldp/lldpd.c @@ -242,6 +242,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; } @@ -282,6 +283,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; |