lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 06 Aug 2012 09:19:55 +0800
From:	Li Wei <lw@...fujitsu.com>
To:	David Stevens <dlstevens@...ibm.com>
CC:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2] ipv4/ipv6: multicast api unappropriate errno fix.

On 08/03/2012 08:09 PM, David Stevens wrote:
> netdev-owner@...r.kernel.org wrote on 08/03/2012 05:29:05 AM:
> 
>> @@ -1933,10 +1933,8 @@ int ip_mc_source(int add, int omode, struct 
>> sock *sk, struct
>>            (pmc->multi.imr_ifindex == imr.imr_ifindex))
>>           break;
>>     }
>> -   if (!pmc) {      /* must have a prior join */
>> -      err = -EINVAL;
>> -      goto done;
>> -   }
>> +   if (!pmc)      /* must have a prior join */
>> +      goto done;   /* err = -EADDRNOTAVAIL */
> 
> RFC3678, section 4.1.3:
>         "When the option itself is not legal on the group (i.e., when 
> trying a
>    Source-Specific option on a group after doing IP_ADD_MEMBERSHIP, or
>    when trying an Any-Source option without doing IP_ADD_MEMBERSHIP) the
>    error generated is EINVAL."
> 
>>     }
>> -   if (rv == 0)      /* address already there is an error */
>> +   if (rv == 0) {      /* address already there is an error */
>> +      err = -EADDRINUSE;
>>        goto done;
>> +   }
> 
> EADDRINUSE is not one of the API's listed error codes. Section 4.1.3
> of RFC3678 specifies:
>   "When the option would be legal on the group, but an address is
>    invalid (e.g., when trying to block a source that is already blocked
>    by the socket, or when trying to drop an unjoined group) the error
>    generated is EADDRNOTAVAIL."
> 
> At least some of this patch directly differs with RFC3678.

I read the RFC and found you are right, thanks :)

> 
>                                                         +-DLS
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ