netdev
[Top] [All Lists]

Re: [PATCH 2.6.9] address family not supported for sendmsg()

To: davem@xxxxxxxxxxxxx
Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg()
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Fri, 22 Oct 2004 15:30:56 +0900 (JST)
Cc: suresh.krishnan@xxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20041021225820.72d278c7.davem@xxxxxxxxxxxxx>
Organization: USAGI Project
References: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20041021225820.72d278c7.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <20041021225820.72d278c7.davem@xxxxxxxxxxxxx> (at Thu, 21 Oct 2004 
22:58:20 -0700), "David S. Miller" <davem@xxxxxxxxxxxxx> says:

> On Fri, 22 Oct 2004 00:27:14 -0400 (EDT)
> Suresh Krishnan <suresh.krishnan@xxxxxxxxxxx> wrote:
> 
> > --- linux-2.6.9/net/ipv6/udp.c  2004-10-18 17:54:55.000000000 -0400
> > +++ linux-2.6.9-patched/net/ipv6/udp.c  2004-10-21 16:37:52.000000000 -0400
> > @@ -699,7 +699,7 @@
> >                 if (likely(up->pending)) {
> >                         if (unlikely(up->pending != AF_INET6)) {
> >                                 release_sock(sk);
> > -                               return -EINVAL;
> > +                               return -EAFNOSUPPORT;
> 
> I think this case should remain -EINVAL.

EAFNOSUPPORT may be okay.

If we try to push data for ipv6 socket
while data is pending for ipv4 destination,
the family of destination (ipv6) is not allowed for that socket.
This may be convered by EAFNOSUPPORT.

--yoshfuji

<Prev in Thread] Current Thread [Next in Thread>