]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Don't check CDP checksums.
authorVincent Bernat <bernat@luffy.cx>
Tue, 8 Jun 2010 16:45:52 +0000 (18:45 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 8 Jun 2010 16:48:05 +0000 (18:48 +0200)
Some VLAN encapsulated CDP frames seem to have a checksum difficult to
verify. We give up on checking correctly CDP checksums. It is turned
into a dead code for future reference.

CHANGELOG
src/cdp.c

index bb293320a85ed1330c244059d3a4807d0dd59b44..247f454889f9bb3f0cab59dacb7509172b4bd244 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -15,6 +15,8 @@ lldpd (0.5.1)
   * Fixes:
     + Ignore interface with no queue. It should filter out interfaces
       like "vnet0" that would fail if we try to send something on them.
+    + Don't check CDP checksums (not really a fix but it appears that
+      Cisco checksum have some difficult corner cases).
 
 lldpd (0.5.0)
 
index 0d7c9576547a884051c34e1e66e8e8fd1dbce3e4..d8717151366918181e44de0639e28fe6b3d2fec7 100644 (file)
--- a/src/cdp.c
+++ b/src/cdp.c
@@ -196,7 +196,9 @@ cdp_decode(struct lldpd *cfg, char *frame, int s,
 {
        struct lldpd_chassis *chassis;
        struct lldpd_port *port;
+#if 0
        u_int16_t cksum;
+#endif
        u_int8_t *software = NULL, *platform = NULL;
        int software_len = 0, platform_len = 0, proto, version, nb, caps;
        const unsigned char cdpaddr[] = CDP_MULTICAST_ADDR;
@@ -265,6 +267,7 @@ cdp_decode(struct lldpd *cfg, char *frame, int s,
                goto malformed;
        }
 
+#if 0
        /* Check checksum */
        cksum = frame_checksum(pos, len_eth - 8,
 #ifdef ENABLE_FDP
@@ -279,6 +282,7 @@ cdp_decode(struct lldpd *cfg, char *frame, int s,
                          hardware->h_ifname, cksum);
                goto malformed;
        }
+#endif
 
        /* Check version */
        version = PEEK_UINT8;