]> git.puffer.fish Git - matthieu/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>
Fri, 25 May 2018 13:49:38 +0000 (15:49 +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 54a9cdbc5b8fb3b19bb3fefda34b73a3369023f5..050c93dbfcadcc3d246bf468ca8b97ca701c8aff 100644 (file)
@@ -369,9 +369,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__);
 }
@@ -446,9 +447,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__);
 }