diff options
author | philip <philip@FreeBSD.org> | 2008-06-01 14:09:54 +0000 |
---|---|---|
committer | philip <philip@FreeBSD.org> | 2008-06-01 14:09:54 +0000 |
commit | d9cb06bec04c5dbff21dfb54a16b80a6be2e1b08 (patch) | |
tree | 9f786300940c0cee7d535bb8a9fb4535c95c97ad /usr.sbin/bsnmpd | |
parent | 2090338957dde65fcb07617b8131344a068f70ff (diff) | |
download | FreeBSD-src-d9cb06bec04c5dbff21dfb54a16b80a6be2e1b08.zip FreeBSD-src-d9cb06bec04c5dbff21dfb54a16b80a6be2e1b08.tar.gz |
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
Diffstat (limited to 'usr.sbin/bsnmpd')
-rw-r--r-- | usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c index e12e283..919e5d4 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c +++ b/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c @@ -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); } } |