Discussion:
[PATCH] ip6_mroute.c return same value as IPv4
(too old to reply)
Loganaden Velvindron
2014-02-12 12:58:17 UTC
Permalink
From FreeBSD:

"IPv4 code returns EPERM if mrouter not initialized. Make IPv6 do the same."

Index: src/sys/netinet6/ip6_mroute.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/ip6_mroute.c,v
retrieving revision 1.104
diff -u -p -r1.104 ip6_mroute.c
--- src/sys/netinet6/ip6_mroute.c 14 Sep 2013 11:33:59 -0000 1.104
+++ src/sys/netinet6/ip6_mroute.c 12 Feb 2014 12:55:53 -0000
@@ -317,7 +317,7 @@ ip6_mrouter_set(struct socket *so, struc
mifi_t mifi;

if (sopt->sopt_name != MRT6_INIT && so != ip6_mrouter)
- return (EACCES);
+ return (EPERM);

error = 0;

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loganaden Velvindron
2014-02-12 13:06:27 UTC
Permalink
On Wed, Feb 12, 2014 at 04:58:17AM -0800, Loganaden Velvindron wrote:

Please ignore as IPv4 doesn't implement that in IPv4, unlike FreeBSD.
Post by Loganaden Velvindron
"IPv4 code returns EPERM if mrouter not initialized. Make IPv6 do the same."
Index: src/sys/netinet6/ip6_mroute.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/ip6_mroute.c,v
retrieving revision 1.104
diff -u -p -r1.104 ip6_mroute.c
--- src/sys/netinet6/ip6_mroute.c 14 Sep 2013 11:33:59 -0000 1.104
+++ src/sys/netinet6/ip6_mroute.c 12 Feb 2014 12:55:53 -0000
@@ -317,7 +317,7 @@ ip6_mrouter_set(struct socket *so, struc
mifi_t mifi;
if (sopt->sopt_name != MRT6_INIT && so != ip6_mrouter)
- return (EACCES);
+ return (EPERM);
error = 0;
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christos Zoulas
2014-02-12 16:57:36 UTC
Permalink
Post by Loganaden Velvindron
Please ignore as IPv4 doesn't implement that in IPv4, unlike FreeBSD.
Nevertheless:

1 EPERM Operation not permitted. An attempt was made to perform an
operation limited to processes with appropriate privileges or to
the owner of a file or other resources.
13 EACCES Permission denied. An attempt was made to access a file in a
way forbidden by its file access permissions.

EPERM is better IMHO.

christos
Post by Loganaden Velvindron
Post by Loganaden Velvindron
"IPv4 code returns EPERM if mrouter not initialized. Make IPv6 do the same."
Index: src/sys/netinet6/ip6_mroute.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/ip6_mroute.c,v
retrieving revision 1.104
diff -u -p -r1.104 ip6_mroute.c
--- src/sys/netinet6/ip6_mroute.c 14 Sep 2013 11:33:59 -0000 1.104
+++ src/sys/netinet6/ip6_mroute.c 12 Feb 2014 12:55:53 -0000
@@ -317,7 +317,7 @@ ip6_mrouter_set(struct socket *so, struc
mifi_t mifi;
if (sopt->sopt_name != MRT6_INIT && so != ip6_mrouter)
- return (EACCES);
+ return (EPERM);
error = 0;
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christos Zoulas
2014-02-12 16:55:30 UTC
Permalink
Post by Loganaden Velvindron
"IPv4 code returns EPERM if mrouter not initialized. Make IPv6 do the same."
Index: src/sys/netinet6/ip6_mroute.c
===================================================================
RCS file: /cvsroot/src/sys/netinet6/ip6_mroute.c,v
retrieving revision 1.104
diff -u -p -r1.104 ip6_mroute.c
--- src/sys/netinet6/ip6_mroute.c 14 Sep 2013 11:33:59 -0000 1.104
+++ src/sys/netinet6/ip6_mroute.c 12 Feb 2014 12:55:53 -0000
@@ -317,7 +317,7 @@ ip6_mrouter_set(struct socket *so, struc
mifi_t mifi;
if (sopt->sopt_name != MRT6_INIT && so != ip6_mrouter)
- return (EACCES);
+ return (EPERM);
error = 0;
LGTM.

christos



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...