Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
filling the table of ALTQ queues retrieved from the kernel. It is possible for the kernel to return the queues not by pa.altq.qid order. When this happens, pf_snmp would only partially fill its table. PR: bin/120974 Submitted by: Mykola Dzham <i -at- levsha.org.ua> MFC after: 3 days
This commit is contained in:
parent
2090338957
commit
d9cb06bec0
@ -1025,7 +1025,7 @@ pfq_refresh(void)
|
||||
memcpy(&e->altq, &pa.altq, sizeof(struct pf_altq));
|
||||
e->index = pa.altq.qid;
|
||||
pfq_table_count = i;
|
||||
TAILQ_INSERT_TAIL(&pfq_table, e, link);
|
||||
INSERT_OBJECT_INT_LINK_INDEX(e, &pfq_table, link, index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user