From 4c94160c23a324643ab96b361e50479017c90786 Mon Sep 17 00:00:00 2001 From: Mike Belopuhov Date: Tue, 7 Mar 2017 16:28:38 +0000 Subject: Don't overwrite the flow ID once it's set Output processing may split, encapsulate or obfuscate a single stream which makes the changed flow ID less useful for purposes of flow control, for instance fair sharing of bandwidth. OK dlg --- sys/net/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/net') diff --git a/sys/net/pf.c b/sys/net/pf.c index f75ef912d0d..711485754dc 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.1016 2017/03/07 09:29:40 mpi Exp $ */ +/* $OpenBSD: pf.c,v 1.1017 2017/03/07 16:28:37 mikeb Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -6782,7 +6782,7 @@ done: s->key[PF_SK_STACK]->inp = pd.m->m_pkthdr.pf.inp; } - if (s) { + 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)); } -- cgit v1.2.3