From nobody@FreeBSD.org  Fri May 10 06:09:39 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 7619EDAE
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 May 2013 06:09:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id 69C55F46
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 May 2013 06:09:39 +0000 (UTC)
Received: from oldred.FreeBSD.org ([127.0.1.6])
	by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4A69cpA092423
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 10 May 2013 06:09:38 GMT
	(envelope-from nobody@oldred.FreeBSD.org)
Received: (from nobody@localhost)
	by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4A69cwx092392;
	Fri, 10 May 2013 06:09:38 GMT
	(envelope-from nobody)
Message-Id: <201305100609.r4A69cwx092392@oldred.FreeBSD.org>
Date: Fri, 10 May 2013 06:09:38 GMT
From: Sven-Thorsten Dietrich <sven@vyatta.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: make return code consistent with IPv4 code
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178472
>Category:       kern
>Synopsis:       [ip6] [patch] make return code consistent with IPv4 code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 10 06:10:00 UTC 2013
>Closed-Date:    Mon Feb 10 15:37:28 CET 2014
>Last-Modified:  Mon Feb 10 14:40:00 UTC 2014
>Originator:     Sven-Thorsten Dietrich
>Release:        head
>Organization:
Vyatta
>Environment:
N/A
>Description:
IPv4 code returns EPERM if mrouter not initialized. Make IPv6 do the same.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: sys/netinet6/ip6_mroute.c
===================================================================
--- sys/netinet6/ip6_mroute.c	(revision 250431)
+++ sys/netinet6/ip6_mroute.c	(working copy)
@@ -348,7 +348,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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri May 10 12:09:35 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178472 
State-Changed-From-To: open->closed 
State-Changed-By: brueffer 
State-Changed-When: Mon Feb 10 15:37:05 CET 2014 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178472 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/178472: commit references a PR
Date: Mon, 10 Feb 2014 14:37:04 +0000 (UTC)

 Author: brueffer
 Date: Mon Feb 10 14:36:51 2014
 New Revision: 261709
 URL: http://svnweb.freebsd.org/changeset/base/261709
 
 Log:
   For IPv6, return the same error code as IPv4 when mrouter is not initialized.
   
   PR:		178472
   Submitted by:	Sven-Thorsten Dietrich <sven at vyatta.com>
   Reviewed by:	bms
 
 Modified:
   head/sys/netinet6/ip6_mroute.c
 
 Modified: head/sys/netinet6/ip6_mroute.c
 ==============================================================================
 --- head/sys/netinet6/ip6_mroute.c	Mon Feb 10 12:52:33 2014	(r261708)
 +++ head/sys/netinet6/ip6_mroute.c	Mon Feb 10 14:36:51 2014	(r261709)
 @@ -361,7 +361,7 @@ X_ip6_mrouter_set(struct socket *so, str
  	mifi_t mifi;
  
  	if (so != V_ip6_mrouter && sopt->sopt_name != MRT6_INIT)
 -		return (EACCES);
 +		return (EPERM);
  
  	switch (sopt->sopt_name) {
  	case MRT6_INIT:
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
