mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls
In del_mfc() we try to find the forwarding entry, but that fails to find
the entry if mfc_stall_ring is not empty.
We should find the entry anyway, and destroy it (and any pending
messages) on delete.
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43031
This commit is contained in:
parent
2a622f14e8
commit
0bc82e4fbb
1 changed files with 6 additions and 11 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue