summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-02-27 13:35:58 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-02-27 13:35:58 +0000
commita5870979af1de1da48d108c2a9204a19b8074ed8 (patch)
tree6f6db2385b8cf53bae1e695ccb0c480bedbee6b7 /sys/net/pf.c
parent84e11a7a5ff6aa6d6440b608b3a6bce0271c8299 (diff)
make packet classification for altq work in the IPv6 case
ok dhartmei@ cedric@ + "looks good" mcbride@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c22
1 files changed, 21 insertions, 1 deletions
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;