From: Vincent Bernat Date: Tue, 8 Jun 2010 16:45:52 +0000 (+0200) Subject: Don't check CDP checksums. X-Git-Tag: 0.5.1~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ea508095301bc532d25393f10545d12563a8099;p=thirdparty%2Flldpd.git Don't check CDP checksums. 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. --- diff --git a/CHANGELOG b/CHANGELOG index bb293320..247f4548 100644 --- 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) diff --git a/src/cdp.c b/src/cdp.c index 0d7c9576..d8717151 100644 --- 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;