]> git.proxmox.com Git - mirror_frr.git/blobdiff - nhrpd/nhrp_cache.c
Merge pull request #10770 from chiragshah6/evpn_dev3
[mirror_frr.git] / nhrpd / nhrp_cache.c
index c358baecb27c3fb1c7f51d5594bd7e1554960629..81d9bb255f7a522e8083a38b34c4bb4134134101 100644 (file)
@@ -197,16 +197,15 @@ struct nhrp_cache *nhrp_cache_get(struct interface *ifp,
                        create ? nhrp_cache_alloc : NULL);
 }
 
-static int nhrp_cache_do_free(struct thread *t)
+static void nhrp_cache_do_free(struct thread *t)
 {
        struct nhrp_cache *c = THREAD_ARG(t);
 
        c->t_timeout = NULL;
        nhrp_cache_free(c);
-       return 0;
 }
 
-static int nhrp_cache_do_timeout(struct thread *t)
+static void nhrp_cache_do_timeout(struct thread *t)
 {
        struct nhrp_cache *c = THREAD_ARG(t);
 
@@ -214,7 +213,6 @@ static int nhrp_cache_do_timeout(struct thread *t)
        if (c->cur.type != NHRP_CACHE_INVALID)
                nhrp_cache_update_binding(c, c->cur.type, -1, NULL, 0, NULL,
                                          NULL);
-       return 0;
 }
 
 static void nhrp_cache_update_route(struct nhrp_cache *c)
@@ -315,7 +313,7 @@ static void nhrp_cache_peer_notifier(struct notifier_block *n,
 static void nhrp_cache_reset_new(struct nhrp_cache *c)
 {
        THREAD_OFF(c->t_auth);
-       if (list_hashed(&c->newpeer_notifier.notifier_entry))
+       if (notifier_list_anywhere(&c->newpeer_notifier))
                nhrp_peer_notify_del(c->new.peer, &c->newpeer_notifier);
        nhrp_peer_unref(c->new.peer);
        memset(&c->new, 0, sizeof(c->new));
@@ -392,12 +390,11 @@ static void nhrp_cache_authorize_binding(struct nhrp_reqid *r, void *arg)
        nhrp_cache_update_timers(c);
 }
 
-static int nhrp_cache_do_auth_timeout(struct thread *t)
+static void nhrp_cache_do_auth_timeout(struct thread *t)
 {
        struct nhrp_cache *c = THREAD_ARG(t);
        c->t_auth = NULL;
        nhrp_cache_authorize_binding(&c->eventid, (void *)"timeout");
-       return 0;
 }
 
 static void nhrp_cache_newpeer_notifier(struct notifier_block *n,
@@ -574,5 +571,5 @@ void nhrp_cache_notify_add(struct nhrp_cache *c, struct notifier_block *n,
 
 void nhrp_cache_notify_del(struct nhrp_cache *c, struct notifier_block *n)
 {
-       notifier_del(n);
+       notifier_del(n, &c->notifier_list);
 }