]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
cdp: don't expect and off-by-one checksum
authorVincent Bernat <vincent@bernat.im>
Sun, 15 Jun 2014 07:47:03 +0000 (09:47 +0200)
committerVincent Bernat <vincent@bernat.im>
Sun, 15 Jun 2014 07:47:03 +0000 (09:47 +0200)
NEWS
src/daemon/cdp.c

diff --git a/NEWS b/NEWS
index f5b2f66132ff2b3a5bae814931a59647c0b566b3..11f5208419d9e0c9d2e92b88c643fc87ac59752f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ lldpd (0.7.10)
   * Features:
     + Ability to set promiscuous mode to work around bugs of some
       switches encapsulating LLDP frames inside 802.1Q frames.
+  * Fix:
+    + Fix checksum computation for Cisco CDP.
 
 lldpd (0.7.9)
   * Changes:
index a66843c5771e6c89380f9c01f1df22969153e92b..2ff574215929801b205dd9c83dd8219fc1b3869e 100644 (file)
@@ -185,7 +185,7 @@ cdp_send(struct lldpd *global,
                        goto toobig;
        }
 #endif
-               
+
        /* Software version */
        if (!(
              POKE_START_CDP_TLV(CDP_TLV_SOFTWARE) &&
@@ -331,8 +331,7 @@ cdp_decode(struct lldpd *cfg, char *frame, int s,
            1                   /* cisco checksum */
 #endif
                );
-       /* An off-by-one error may happen. Just ignore it */
-       if ((cksum != 0) && (cksum != 0xfffe)) {
+       if (cksum != 0) {
                log_info("cdp", "incorrect CDP/FDP checksum for frame received on %s (%d)",
                          hardware->h_ifname, cksum);
                goto malformed;