summaryrefslogtreecommitdiff
path: root/sys/net/if_pppx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_pppx.c')
-rw-r--r--sys/net/if_pppx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c
index aac69060956..c4df48c0f00 100644
--- a/sys/net/if_pppx.c
+++ b/sys/net/if_pppx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppx.c,v 1.62 2017/08/11 21:24:19 mpi Exp $ */
+/* $OpenBSD: if_pppx.c,v 1.63 2017/08/12 20:27:28 mpi Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -855,9 +855,9 @@ pppx_add_session(struct pppx_dev *pxd, struct pipex_session_req *req)
pipex_timer_start();
/* XXXSMP breaks atomicity */
- rw_exit_write(&netlock);
+ NET_UNLOCK();
if_attach(ifp);
- rw_enter_write(&netlock);
+ NET_LOCK();
if_addgroup(ifp, "pppx");
if_alloc_sadl(ifp);
@@ -970,9 +970,9 @@ pppx_if_destroy(struct pppx_dev *pxd, struct pppx_if *pxi)
pipex_timer_stop();
/* XXXSMP breaks atomicity */
- rw_exit_write(&netlock);
+ NET_UNLOCK();
if_detach(ifp);
- rw_enter_write(&netlock);
+ NET_LOCK();
rw_enter_write(&pppx_ifs_lk);
if (RBT_REMOVE(pppx_ifs, &pppx_ifs, pxi) == NULL)