From 45c8b07a351f80b997000d726a2fc5be830064a8 Mon Sep 17 00:00:00 2001 From: Jorge Boncompte Date: Thu, 3 Aug 2017 19:12:27 +0200 Subject: [PATCH] nhrp: fix assertion with negative holding times Correctly reset status or we later assert at nhrp_cache_free(). Signed-off-by: Jorge Boncompte --- nhrpd/nhrp_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c index bd884bbc51..3ebdbf27ba 100644 --- a/nhrpd/nhrp_cache.c +++ b/nhrpd/nhrp_cache.c @@ -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 || -- 2.39.5