use the state id to set a flowid on an mbuf.
authordlg <dlg@openbsd.org>
Thu, 8 Oct 2015 11:36:51 +0000 (11:36 +0000)
committerdlg <dlg@openbsd.org>
Thu, 8 Oct 2015 11:36:51 +0000 (11:36 +0000)
ok mpi@ mikeb@ sthen@

sys/net/pf.c

index 50dd87e..bc5cc6a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pf.c,v 1.945 2015/09/23 08:49:46 mpi Exp $ */
+/*     $OpenBSD: pf.c,v 1.946 2015/10/08 11:36:51 dlg Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -6537,6 +6537,11 @@ done:
                s->key[PF_SK_STACK]->inp = pd.m->m_pkthdr.pf.inp;
        }
 
+       if (s) {
+               pd.m->m_pkthdr.flowid = M_FLOWID_VALID |
+                   (M_FLOWID_MASK & bemtoh64(&s->id));
+       }
+
        /*
         * connections redirected to loopback should not match sockets
         * bound specifically to loopback due to security implications,