summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormvs <mvs@openbsd.org>2021-01-18 18:29:19 +0000
committermvs <mvs@openbsd.org>2021-01-18 18:29:19 +0000
commite2b629398376d04c74ab3f45ae067161fd27c4e4 (patch)
treed59b1228b31a922ac87be57a4eea8fef6767bec0
parentregen (diff)
downloadwireguard-openbsd-e2b629398376d04c74ab3f45ae067161fd27c4e4.tar.xz
wireguard-openbsd-e2b629398376d04c74ab3f45ae067161fd27c4e4.zip
Convert ifunit() to if_unit(9).
ok sashan@
-rw-r--r--sys/net/if_pfsync.c7
-rw-r--r--sys/sys/syscall.h4
-rw-r--r--sys/sys/syscallargs.h4
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 029c8f36f05..9f47717440f 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.280 2021/01/04 12:48:27 bluhm Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.281 2021/01/18 18:29:19 mvs Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1391,7 +1391,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
- if ((sifp = ifunit(pfsyncr.pfsyncr_syncdev)) == NULL)
+ if ((sifp = if_unit(pfsyncr.pfsyncr_syncdev)) == NULL)
return (EINVAL);
ifp0 = if_get(sc->sc_sync_ifidx);
@@ -1418,6 +1418,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (!(sifp->if_flags & IFF_MULTICAST)) {
sc->sc_sync_ifidx = 0;
+ if_put(sifp);
return (EADDRNOTAVAIL);
}
@@ -1426,6 +1427,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if ((imo->imo_membership[0] =
in_addmulti(&addr, sifp)) == NULL) {
sc->sc_sync_ifidx = 0;
+ if_put(sifp);
return (ENOBUFS);
}
imo->imo_num_memberships++;
@@ -1448,6 +1450,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if_linkstatehook_add(sifp, &sc->sc_ltask);
if_detachhook_add(sifp, &sc->sc_dtask);
+ if_put(sifp);
pfsync_request_full_update(sc);
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 3500f7f3008..83507342f29 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: syscall.h,v 1.215 2020/03/18 19:35:00 anton Exp $ */
+/* $OpenBSD: syscall.h,v 1.216 2021/01/18 18:29:19 mvs Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.207 2020/03/18 19:33:36 anton Exp
+ * created from; OpenBSD: syscalls.master,v 1.208 2021/01/18 18:25:51 mvs Exp
*/
/* syscall: "syscall" ret: "int" args: "int" "..." */
diff --git a/sys/sys/syscallargs.h b/sys/sys/syscallargs.h
index 22096060880..4b388e6f8d1 100644
--- a/sys/sys/syscallargs.h
+++ b/sys/sys/syscallargs.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: syscallargs.h,v 1.218 2020/03/18 19:35:00 anton Exp $ */
+/* $OpenBSD: syscallargs.h,v 1.219 2021/01/18 18:29:19 mvs Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from; OpenBSD: syscalls.master,v 1.207 2020/03/18 19:33:36 anton Exp
+ * created from; OpenBSD: syscalls.master,v 1.208 2021/01/18 18:25:51 mvs Exp
*/
#ifdef syscallarg