]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrp: fix assertion with negative holding times 867/head
authorJorge Boncompte <jbonor@gmail.com>
Thu, 3 Aug 2017 17:12:27 +0000 (19:12 +0200)
committerJorge Boncompte <jbonor@gmail.com>
Fri, 4 Aug 2017 08:19:36 +0000 (10:19 +0200)
Correctly reset status or we later assert at nhrp_cache_free().

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
nhrpd/nhrp_cache.c

index bd884bbc51390781012e964afc65490406322257..3ebdbf27ba9e5b2418a2377ba3ef4ee670464aeb 100644 (file)
@@ -289,7 +289,7 @@ int nhrp_cache_update_binding(struct nhrp_cache *c, enum nhrp_cache_type type, i
                if (holding_time > 0)
                        c->new.expires = monotime(NULL) + holding_time;
                else if (holding_time < 0)
-                       c->new.type = NHRP_CACHE_INVALID;
+                       nhrp_cache_reset_new(c);
 
                if (c->new.type == NHRP_CACHE_INVALID ||
                    c->new.type >= NHRP_CACHE_STATIC ||