]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pim6d: fix channel oil leak on embedded RP
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Sun, 29 Sep 2024 14:04:39 +0000 (11:04 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 13 Nov 2024 15:05:35 +0000 (12:05 -0300)
When a multicast route is created with embedded RP the channel oil
never gets decremented when `clear ipv6 mroute` is called.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
pimd/pim6_mld.c

index 97e110e3841fa59de7d3a81062b256dc3c5ac38f..b44169c522f1f7d615b752e59e0a4ac9b1b0dfaa 100644 (file)
@@ -444,6 +444,13 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
        }
 
        if (desired == GM_SG_NOINFO) {
+               /*
+                * If oil is still present then get ride of it or we will leak
+                * this data structure.
+                */
+               if (sg->oil)
+                       pim_channel_oil_del(sg->oil, __func__);
+
                /* multiple paths can lead to the last state going away;
                 * t_sg_expire can still be running if we're arriving from
                 * another path.