Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Sep 2013 19:40:11 GMT
From:      Sven-Thorsten Dietrich <sven@vyatta.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/181823: make ipv6 mroute return same errror codes as IPv4
Message-ID:  <201309041940.r84JeBiN092879@oldred.freebsd.org>
Resent-Message-ID: <201309041950.r84Jo2Ao045282@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181823
>Category:       kern
>Synopsis:       make ipv6 mroute return same errror codes as IPv4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 04 19:50:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Sven-Thorsten Dietrich
>Release:        HEAD
>Organization:
Vyatta
>Environment:
>Description:
IPv4 mroute code returns EPERM when MRT_INIT hasn't been called.
Make IPV6 behave the same way.
Arguably IPv4 should return EACCESS, but since IPV6 came later,
the logical first step would be to make them consistent.

>How-To-Repeat:

>Fix:
see patch

Patch attached with submission follows:

IPv4 mroute code returns EPERM when MRT_INIT hasn't been called.
Make IPV6 behave the same way.
Arguably IPv4 should return EACCESS, but since IPV6 came later,
the logical first step would be to make them consistent.
Signed-off-by: Sven-Throsten Dietrich <sven@vyatta.com>

Index: netinet6/ip6_mroute.c
===================================================================
--- netinet6/ip6_mroute.c	(revision 255189)
+++ netinet6/ip6_mroute.c	(working copy)
@@ -353,7 +353,7 @@
 	mifi_t mifi;
 
 	if (so != V_ip6_mrouter && sopt->sopt_name != MRT6_INIT)
-		return (EACCES);
+		return (EPERM);
 
 	switch (sopt->sopt_name) {
 	case MRT6_INIT:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309041940.r84JeBiN092879>