]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon/cdp: fix another logic error when parsing FDP packets
authorVincent Bernat <vincent@bernat.ch>
Fri, 8 May 2026 21:21:43 +0000 (23:21 +0200)
committerVincent Bernat <vincent@bernat.ch>
Fri, 8 May 2026 21:21:43 +0000 (23:21 +0200)
src/daemon/protocols/cdp.c

index 08bad84fdc1beb39973b54281159cf1a983f5cef..d4869adad8aa6e9a62b371266dcefcc876e824b8 100644 (file)
@@ -329,7 +329,7 @@ cdp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardwar
        if (PEEK_CMP(cdpaddr, sizeof(cdpaddr)) != 0) {
 #  ifdef ENABLE_FDP
                PEEK_RESTORE((u_int8_t *)frame);
-               if (PEEK_CMP(fdpaddr, sizeof(fdpaddr)) != 0)
+               if (PEEK_CMP(fdpaddr, sizeof(fdpaddr)) == 0)
                        fdp = 1;
                else {
 #  endif