bugfix: ip_reassembly_expire busy loop
This commit is contained in:
@@ -816,14 +816,19 @@ void ip_reassembly_expire(struct ip_reassembly *assy, uint64_t now)
|
|||||||
{
|
{
|
||||||
struct ip_flow *flow = NULL;
|
struct ip_flow *flow = NULL;
|
||||||
uint64_t timeout = assy->timeout;
|
uint64_t timeout = assy->timeout;
|
||||||
|
|
||||||
TAILQ_FOREACH(flow, &assy->lru, lru)
|
TAILQ_FOREACH(flow, &assy->lru, lru)
|
||||||
if (timeout + flow->create_time <= now)
|
|
||||||
{
|
{
|
||||||
IP_REASSEMBLE_DEBUG1("expire ip flow: discarding old fragmented packets", &flow->key);
|
if (timeout + flow->create_time <= now)
|
||||||
ip_reassembly_del_flow(assy, flow);
|
{
|
||||||
ip_reassembly_stat_inc(assy, timeout, &flow->key);
|
IP_REASSEMBLE_DEBUG1("expire ip flow: discarding old fragmented packets", &flow->key);
|
||||||
ip_flow_free(flow);
|
ip_reassembly_del_flow(assy, flow);
|
||||||
|
ip_reassembly_stat_inc(assy, timeout, &flow->key);
|
||||||
|
ip_flow_free(flow);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user