]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldp: fix parsing of LLDP pair control
authorVincent Bernat <bernat@luffy.cx>
Thu, 25 Oct 2012 05:39:21 +0000 (07:39 +0200)
committerVincent Bernat <bernat@luffy.cx>
Thu, 25 Oct 2012 05:39:21 +0000 (07:39 +0200)
Thanks to Viktor Dukhovni for noticing this bug.

src/daemon/lldp.c

index 34c385412545dcd43659fb0c66cf1e98a48ba6c8..f7162d89ee6eb1b558ac491f55466b4fcb0fd230 100644 (file)
@@ -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;