From: Vincent Bernat Date: Wed, 10 Dec 2014 16:09:30 +0000 (+0100) Subject: lldp: fix display of unknown organizational ID X-Git-Tag: 0.7.13~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3cae2a7299fcc3aa508fe0d13d98c4d9f1fe1d7;p=thirdparty%2Flldpd.git lldp: fix display of unknown organizational ID Because it was stored in a signed char array, it was incorrectly displayed with the "%x" formatter. Store it into an unsigned char array. --- diff --git a/src/daemon/lldp.c b/src/daemon/lldp.c index ae01ccc5..3d0a988b 100644 --- a/src/daemon/lldp.c +++ b/src/daemon/lldp.c @@ -483,7 +483,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, const char dot3[] = LLDP_TLV_ORG_DOT3; const char med[] = LLDP_TLV_ORG_MED; const char dcbx[] = LLDP_TLV_ORG_DCBX; - char orgid[3]; + unsigned char orgid[3]; int length, gotend = 0, ttl_received = 0; int tlv_size, tlv_type, tlv_subtype; u_int8_t *pos, *tlv;