]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: ipset and ipset entry deletion remove entry from hash list too
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 26 Apr 2018 11:31:16 +0000 (13:31 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Wed, 30 May 2018 17:30:05 +0000 (19:30 +0200)
This commit is a fix that removes the structure from the hash list,
instead of just removing that structure.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
zebra/zebra_pbr.c

index 93c523bf5026300b22d83039492bc9e90ce4bdde..ac0192f2dedeb0443de90d2a63bf32fa12af3dab 100644 (file)
@@ -360,9 +360,10 @@ void zebra_pbr_destroy_ipset(struct zebra_ns *zns,
         * - Netlink destroy from kernel
         * - ?? destroy ipset entries before
         */
-       if (lookup)
+       if (lookup) {
+               hash_release(zns->ipset_hash, lookup);
                XFREE(MTYPE_TMP, lookup);
-       else
+       else
                zlog_warn("%s: IPSet Entry being deleted we know nothing about",
                          __PRETTY_FUNCTION__);
 }
@@ -437,9 +438,10 @@ void zebra_pbr_del_ipset_entry(struct zebra_ns *zns,
         * - detach from ipset list
         * - ?? if no more entres, delete ipset
         */
-       if (lookup)
+       if (lookup) {
+               hash_release(zns->ipset_entry_hash, lookup);
                XFREE(MTYPE_TMP, lookup);
-       else
+       else
                zlog_warn("%s: IPSet being deleted we know nothing about",
                          __PRETTY_FUNCTION__);
 }