diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_mroute.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 10ac13d7d582..b864a4db5abc 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1250,22 +1250,17 @@ del_mfc(struct mfcctl2 *mfccp) MRW_WLOCK(); - rt = mfc_find(&origin, &mcastgrp); + LIST_FOREACH(rt, &V_mfchashtbl[MFCHASH(origin, mcastgrp)], mfc_hash) { + if (in_hosteq(rt->mfc_origin, origin) && + in_hosteq(rt->mfc_mcastgrp, mcastgrp)) + break; + } if (rt == NULL) { MRW_WUNLOCK(); return EADDRNOTAVAIL; } - /* - * free the bw_meter entries - */ - free_bw_list(rt->mfc_bw_meter_leq); - rt->mfc_bw_meter_leq = NULL; - free_bw_list(rt->mfc_bw_meter_geq); - rt->mfc_bw_meter_geq = NULL; - - LIST_REMOVE(rt, mfc_hash); - free(rt, M_MRTABLE); + expire_mfc(rt); MRW_WUNLOCK(); |