From: Philippe Guibert Date: Thu, 26 Apr 2018 11:31:16 +0000 (+0200) Subject: zebra: ipset and ipset entry deletion remove entry from hash list too X-Git-Tag: frr-6.1-dev~395^2~29 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=de67547dd2678a8ba64c0b3e66793c3d4452f1d4;p=matthieu%2Ffrr.git zebra: ipset and ipset entry deletion remove entry from hash list too This commit is a fix that removes the structure from the hash list, instead of just removing that structure. Signed-off-by: Philippe Guibert --- diff --git a/zebra/zebra_pbr.c b/zebra/zebra_pbr.c index 54a9cdbc5b..050c93dbfc 100644 --- a/zebra/zebra_pbr.c +++ b/zebra/zebra_pbr.c @@ -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__); }