summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-10-16 13:25:37 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2024-10-16 13:30:25 +0200
commit4a3843e8d298299cd5527f8dbdbbc61da6b34c9d (patch)
treec7049ea1a9e0ec527133622e780fbc0ff4eb5a0a
parent6476f9deac140ce017e1959fa4eb8fff19b8c60f (diff)
pimd: MLD packets always have an interface
If a packet doesn't have an interface, we're gonna crash 2 lines below. An assert is a little more useful... and makes clang-SA not complain about it. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r--pimd/pim6_mld.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pimd/pim6_mld.c b/pimd/pim6_mld.c
index a871837701..59cd9aea5f 100644
--- a/pimd/pim6_mld.c
+++ b/pimd/pim6_mld.c
@@ -468,6 +468,8 @@ static void gm_sg_update(struct gm_sg *sg, bool has_expired)
static void gm_packet_free(struct gm_packet_state *pkt)
{
+ assert(pkt->iface);
+
gm_packet_expires_del(pkt->iface->expires, pkt);
gm_packets_del(pkt->subscriber->packets, pkt);
gm_subscriber_drop(&pkt->subscriber);