From a5870979af1de1da48d108c2a9204a19b8074ed8 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 27 Feb 2003 13:35:58 +0000 Subject: make packet classification for altq work in the IPv6 case ok dhartmei@ cedric@ + "looks good" mcbride@ --- sys/net/pf.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sys/net/pf.c b/sys/net/pf.c index d912096ebd8..0a55f997099 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.323 2003/02/27 12:56:04 cedric Exp $ */ +/* $OpenBSD: pf.c,v 1.324 2003/02/27 13:35:57 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -4618,6 +4618,26 @@ done: /* XXX handle IPv6 options, if not allowed. not implemented. */ +#ifdef ALTQ + if (action != PF_DROP && r != NULL && r->qid) { + struct m_tag *mtag; + struct altq_tag *atag; + + mtag = m_tag_get(PACKET_TAG_PF_QID, sizeof(*atag), M_NOWAIT); + if (mtag != NULL) { + atag = (struct altq_tag *)(mtag + 1); + if (pd.tos == IPTOS_LOWDELAY) + atag->qid = r->pqid; + else + atag->qid = r->qid; + /* add hints for ecn */ + atag->af = AF_INET6; + atag->hdr = h; + m_tag_prepend(m, mtag); + } + } +#endif + if (log) { if (r == NULL) { struct pf_rule r0; -- cgit v1.2.3