From: Vincent Bernat Date: Thu, 25 Oct 2012 05:39:21 +0000 (+0200) Subject: lldp: fix parsing of LLDP pair control X-Git-Tag: 0.7.0~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=181351d6bfddbc2445961b1ce56b47adbca83651;p=thirdparty%2Flldpd.git lldp: fix parsing of LLDP pair control Thanks to Viktor Dukhovni for noticing this bug. --- diff --git a/src/daemon/lldp.c b/src/daemon/lldp.c index 34c38541..f7162d89 100644 --- a/src/daemon/lldp.c +++ b/src/daemon/lldp.c @@ -766,7 +766,7 @@ lldp_decode(struct lldpd *cfg, char *frame, int s, port->p_power.enabled = (port->p_power.devicetype & 0x4) >> 2; port->p_power.paircontrol = - (port->p_power.devicetype & 0x8) >> 4; + (port->p_power.devicetype & 0x8) >> 3; port->p_power.devicetype = (port->p_power.devicetype & 0x1)? LLDP_DOT3_POWER_PSE:LLDP_DOT3_POWER_PD;