summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2015-07-21 03:00:21 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2015-07-21 03:00:21 +0000
commitb2ee69f0290be39585c489263a41413d9c525a84 (patch)
treeb3b8e4495ee0cbba9de7f15174629e88d3e1bbca
parent41962fe8fab54e3e35938081979b4f70441afab4 (diff)
use curproc instead of proc0
pointed out by and OK bluhm@
-rw-r--r--sys/net/if_pflow.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c
index d2f7ad9c5a3..3b65e35b9d3 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.53 2015/07/20 23:15:54 florian Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.54 2015/07/21 03:00:20 florian Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
@@ -105,8 +105,6 @@ struct if_clone pflow_cloner =
IF_CLONE_INITIALIZER("pflow", pflow_clone_create,
pflow_clone_destroy);
-extern struct proc proc0;
-
void
pflowattach(int npflow)
{
@@ -135,7 +133,7 @@ pflow_clone_create(struct if_clone *ifc, int unit)
sin->sin_family = AF_INET;
sin->sin_addr.s_addr = INADDR_ANY;
sin->sin_port = htons(0);
- error = sobind(so, m, &proc0);
+ error = sobind(so, m, curproc);
m_freem(m);
if (error) {
soclose(so);
@@ -404,7 +402,7 @@ pflowioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
sin->sin_addr.s_addr = pflowr.sender_ip.s_addr;
sin->sin_port = 0;
- error = sobind(so, m, &proc0);
+ error = sobind(so, m, p);
m_freem(m);
if (error) {
soclose(so);