summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-07-02 22:20:07 +0000
committernicm <nicm@openbsd.org>2011-07-02 22:20:07 +0000
commitb8d5a5fb3cd18b5becb179d749e65fc04a659093 (patch)
treea14bf2c9e20868318f34cb59c7793894408769bf /sys/net/if_tun.c
parentPer recommandation in the the sparc docs, use unlocked reads when (diff)
downloadwireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.tar.xz
wireguard-openbsd-b8d5a5fb3cd18b5becb179d749e65fc04a659093.zip
kqueue attach functions should return an errno or 0, not a plain 1. Fix
the obvious cases to return EINVAL and ENXIO. ok tedu deraadt
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index d9f6e7a27c0..ef649750c68 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.109 2010/09/23 04:47:02 matthew Exp $ */
+/* $OpenBSD: if_tun.c,v 1.110 2011/07/02 22:20:08 nicm Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -1051,7 +1051,7 @@ tunkqfilter(dev_t dev, struct knote *kn)
kn->kn_fop = &tunwrite_filtops;
break;
default:
- return (EPERM); /* 1 */
+ return (EINVAL);
}
kn->kn_hook = (caddr_t)tp;