[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OF074B1468.BAD353FE-ON85257A4F.0041C4E9-85257A4F.0042D425@us.ibm.com>
Date: Fri, 3 Aug 2012 08:09:58 -0400
From: David Stevens <dlstevens@...ibm.com>
To: Li Wei <lw@...fujitsu.com>
Cc: davem@...emloft.net, Li Wei <lw@...fujitsu.com>,
netdev@...r.kernel.org, netdev-owner@...r.kernel.org
Subject: Re: [PATCH v2] ipv4/ipv6: multicast api unappropriate errno fix.
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.
+-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
Powered by blists - more mailing lists