tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] ip6_mroute.c return same value as IPv4



In article <20140212130627.GA26862%mx.elandsys.com@localhost>,
Loganaden Velvindron  <logan%elandsys.com@localhost> wrote:
>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.

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

>
>> 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;
>





Home | Main Index | Thread Index | Old Index