]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: really accepts only 4 neighbors
authorVincent Bernat <bernat@luffy.cx>
Tue, 2 Apr 2013 18:26:30 +0000 (20:26 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 2 Apr 2013 18:26:30 +0000 (20:26 +0200)
src/daemon/lldpd.c

index 303ee52f34586b506b2ef9e6406aceebc5079153..bbeafc39442e01ded2869a913e48813a9712583f 100644 (file)
@@ -449,7 +449,7 @@ lldpd_decode(struct lldpd *cfg, char *frame, int s,
        }
        /* Do we have room for a new MSAP? */
        if (!oport && cfg->g_config.c_max_neighbors &&
-           count > cfg->g_config.c_max_neighbors) {
+           count > cfg->g_config.c_max_neighbors - 1) {
                log_info("decode",
                    "too many neighbors for port %s, drop this new one",
                    hardware->h_ifname);