diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-04-24 08:00:13 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2010-04-24 08:00:13 +0000 |
commit | d269632bbad553bb70cc3933dce921d33d6479af (patch) | |
tree | acf25fd591ca653bb6d8512531e836a4ae715122 /sys/net | |
parent | 51451a503aa2b481281695bc3f4757faa38fbec7 (diff) |
Make if_ppp and if_sl ioctl handlers return ENOTTY for unsupported
ioctls, instead of -1 or EINVAL. ENOTTY audit suggested to me by uwe.
ok dlg tedu
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_ppp.c | 6 | ||||
-rw-r--r-- | sys/net/if_sl.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 5308a4ff8d8..ec5403c9f48 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.55 2009/11/03 10:59:04 claudio Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.56 2010/04/24 08:00:12 stsp Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -605,7 +605,7 @@ pppioctl(sc, cmd, data, flag, p) #endif default: - return (-1); + return (ENOTTY); } return (0); } @@ -695,7 +695,7 @@ pppsioctl(ifp, cmd, data) #endif /* PPP_COMPRESS */ default: - error = EINVAL; + error = ENOTTY; } splx(s); return (error); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index f49c428562e..a3a8418b4d0 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sl.c,v 1.39 2009/11/03 10:59:04 claudio Exp $ */ +/* $OpenBSD: if_sl.c,v 1.40 2010/04/24 08:00:12 stsp Exp $ */ /* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */ /* @@ -391,7 +391,7 @@ sltioctl(tp, cmd, data, flag) break; default: - return (-1); + return (ENOTTY); } return (0); } |