diff options
author | Lawrence Teo <lteo@cvs.openbsd.org> | 2014-03-10 05:28:12 +0000 |
---|---|---|
committer | Lawrence Teo <lteo@cvs.openbsd.org> | 2014-03-10 05:28:12 +0000 |
commit | c415e1e1052a8b85594de4158a4cfcd651c55cda (patch) | |
tree | 909f1d9d2388ef9fd9522d2e9f9650943c76804d | |
parent | dc985e047a0e7dc35b5dc811eb4bffa852432c44 (diff) |
In ip6_mrouter_set() and ip6_mrouter_get(), change the error number
EACCES to EPERM. EACCES is meant for file access permissions (as
documented on the errno(2) man page), so EPERM seems more appropriate.
Based on a similar change from FreeBSD via Loganaden Velvindron.
ok bluhm@
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 6fd4661c280..562c058fec5 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -247,7 +247,7 @@ int ip6_mrouter_set(int cmd, struct socket *so, struct mbuf *m) { if (cmd != MRT6_INIT && so != ip6_mrouter) - return (EACCES); + return (EPERM); switch (cmd) { case MRT6_INIT: @@ -287,7 +287,8 @@ ip6_mrouter_set(int cmd, struct socket *so, struct mbuf *m) int ip6_mrouter_get(int cmd, struct socket *so, struct mbuf **m) { - if (so != ip6_mrouter) return EACCES; + if (so != ip6_mrouter) + return (EPERM); *m = m_get(M_WAIT, MT_SOOPTS); |