From: Li Wei <lw@cn.fujitsu.com>
To: David Stevens <dlstevens@us.ibm.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2] ipv4/ipv6: multicast api unappropriate errno fix.
Date: Mon, 06 Aug 2012 09:19:55 +0800 [thread overview]
Message-ID: <501F1BBB.5010108@cn.fujitsu.com> (raw)
In-Reply-To: <OF074B1468.BAD353FE-ON85257A4F.0041C4E9-85257A4F.0042D425@us.ibm.com>
On 08/03/2012 08:09 PM, David Stevens wrote:
> netdev-owner@vger.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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-08-06 1:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 7:06 [PATCH] ipv4/ipv6: multicast api unappropriate errno fix Li Wei
2012-08-03 9:29 ` [PATCH v2] " Li Wei
2012-08-03 12:09 ` David Stevens
2012-08-06 1:19 ` Li Wei [this message]
2012-08-03 9:31 ` [PATCH] " Li Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501F1BBB.5010108@cn.fujitsu.com \
--to=lw@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=dlstevens@us.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.