diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2023-01-02 05:32:41 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2023-01-02 05:32:41 +0000 |
commit | 722ce40c01e3733e52dcc37db965b70fbb91705c (patch) | |
tree | 5caead22f397047b44fe3dfb40f096f7fa3400dd /sys | |
parent | 30b902f70f187f3dfa4d83a2931e7ada3af555db (diff) |
use the pf generated toeplitz hash when setting the mbuf flow id.
before this it would use the pf state id, which is just an increasing
number. the toeplitz hash is generated/used by the rest of the
stack, so this encourages consistent flow of traffic through the
system.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 80095c061f3..fb6af610d5d 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1164 2022/12/27 20:13:03 patrick Exp $ */ +/* $OpenBSD: pf.c,v 1.1165 2023/01/02 05:32:40 dlg Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -7671,7 +7671,7 @@ done: pd.m->m_pkthdr.pf.inp); if (s != NULL && !ISSET(pd.m->m_pkthdr.csum_flags, M_FLOWID)) { - pd.m->m_pkthdr.ph_flowid = bemtoh64(&s->id); + pd.m->m_pkthdr.ph_flowid = s->key[PF_SK_WIRE]->hash; SET(pd.m->m_pkthdr.csum_flags, M_FLOWID); } |