summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2020-06-17 06:45:23 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2020-06-17 06:45:23 +0000
commit30f2001bbde2fe577337a04c801d42bf64e981db (patch)
treeb0c0198008049ad53e2faeb93aa4a52b877141a2 /sys/net/pf.c
parentc719e821d9d1034bdfbaffeb6efbf54d5f6c425f (diff)
make ph_flowid in mbufs 16bits by storing whether it's set in csum_flags.
i've been wanting to do this for a while, and now that we've got stoeplitz and it gives us 16 bits, it seems like the right time.
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index ebe339921fa..d31ef989743 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.1091 2019/11/17 08:25:05 otto Exp $ */
+/* $OpenBSD: pf.c,v 1.1092 2020/06/17 06:45:22 dlg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -7177,10 +7177,8 @@ done:
pf_state_key_link_inpcb(s->key[PF_SK_STACK],
pd.m->m_pkthdr.pf.inp);
- if (s && (pd.m->m_pkthdr.ph_flowid & M_FLOWID_VALID) == 0) {
- pd.m->m_pkthdr.ph_flowid = M_FLOWID_VALID |
- (M_FLOWID_MASK & bemtoh64(&s->id));
- }
+ if (s && (pd.m->m_pkthdr.csum_flags & M_FLOWID) == 0)
+ pd.m->m_pkthdr.ph_flowid = bemtoh64(&s->id);
/*
* connections redirected to loopback should not match sockets