diff options
author | 2011-07-02 22:20:07 +0000 | |
---|---|---|
committer | 2011-07-02 22:20:07 +0000 | |
commit | b8d5a5fb3cd18b5becb179d749e65fc04a659093 (patch) | |
tree | a14bf2c9e20868318f34cb59c7793894408769bf /sys/net | |
parent | Per recommandation in the the sparc docs, use unlocked reads when (diff) | |
download | wireguard-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')
-rw-r--r-- | sys/net/bpf.c | 4 | ||||
-rw-r--r-- | sys/net/if_pppx.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 051f41cf801..c602a6a4e11 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.77 2011/01/04 15:24:11 deraadt Exp $ */ +/* $OpenBSD: bpf.c,v 1.78 2011/07/02 22:20:08 nicm Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1070,7 +1070,7 @@ bpfkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &bpfread_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)((u_long)dev); diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 1b54ee0ae87..a624eedfbef 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.7 2011/04/14 05:13:45 dlg Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.8 2011/07/02 22:20:08 nicm Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -513,7 +513,7 @@ pppxkqfilter(dev_t dev, struct knote *kn) kn->kn_fop = &pppx_wr_filtops; break; default: - return (1); + return (EINVAL); } kn->kn_hook = (caddr_t)pxd; 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; |