From fd42954318f50778482e8cf77410bcfb8f312aa7 Mon Sep 17 00:00:00 2001 From: henning Date: Thu, 24 Apr 2014 11:55:12 +0000 Subject: [PATCH] ewps... repair qid assignment --- sys/net/pf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/net/pf.c b/sys/net/pf.c index 6776b283e77..50bd84e6fe9 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.876 2014/04/22 14:41:03 mpi Exp $ */ +/* $OpenBSD: pf.c,v 1.877 2014/04/24 11:55:12 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2359,6 +2359,8 @@ pf_send_tcp(const struct pf_rule *r, sa_family_t af, m->m_pkthdr.ph_rtableid = rdom; if (r && (r->scrub_flags & PFSTATE_SETPRIO)) m->m_pkthdr.pf.prio = r->set_prio[0]; + if (r && r->qid) + m->m_pkthdr.pf.qid = r->qid; m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len = len; m->m_pkthdr.rcvif = NULL; @@ -2461,6 +2463,8 @@ pf_send_icmp(struct mbuf *m, u_int8_t type, u_int8_t code, sa_family_t af, m0->m_pkthdr.ph_rtableid = rdomain; if (r && (r->scrub_flags & PFSTATE_SETPRIO)) m0->m_pkthdr.pf.prio = r->set_prio[0]; + if (r && r->qid) + m->m_pkthdr.pf.qid = r->qid; switch (af) { #ifdef INET @@ -6577,6 +6581,8 @@ done: } } + if (action == PF_PASS && qid) + pd.m->m_pkthdr.pf.qid = qid; if (pd.dir == PF_IN && s && s->key[PF_SK_STACK]) pd.m->m_pkthdr.pf.statekey = s->key[PF_SK_STACK]; if (pd.dir == PF_OUT && -- 2.20.1