netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
@ 2003-07-10 23:32 Thomas Graf
  2003-07-11  0:29 ` David S. Miller
  2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Graf @ 2003-07-10 23:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, tgraf

Hello

Another 1003.1 fix:

[EDESTADDRREQ]
    The socket is not connection-mode and does not have its peer
    address set, and no destination address was specified.

fixes sendmsg in ipv{4,6}/{raw,udp}

 -- thomas


Index: net/ipv4/raw.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/ipv4/raw.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 raw.c
--- net/ipv4/raw.c	10 Jul 2003 22:58:45 -0000	1.1.1.2
+++ net/ipv4/raw.c	10 Jul 2003 23:18:04 -0000
@@ -383,7 +383,7 @@
 		 * IP_HDRINCL is much more convenient.
 		 */
 	} else {
-		err = -EINVAL;
+		err = -EDESTADDRREQ;
 		if (sk->sk_state != TCP_ESTABLISHED) 
 			goto out;
 		daddr = inet->daddr;
Index: net/ipv4/udp.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/ipv4/udp.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 udp.c
--- net/ipv4/udp.c	9 Jul 2003 18:42:29 -0000	1.1.1.1
+++ net/ipv4/udp.c	10 Jul 2003 23:18:04 -0000
@@ -540,7 +540,7 @@
 			return -EINVAL;
 	} else {
 		if (sk->sk_state != TCP_ESTABLISHED)
-			return -ENOTCONN;
+			return -EDESTADDRREQ;
 		daddr = inet->daddr;
 		dport = inet->dport;
 		/* Open fast path for connected socket.
Index: net/ipv6/raw.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/ipv6/raw.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 raw.c
--- net/ipv6/raw.c	10 Jul 2003 22:58:50 -0000	1.1.1.2
+++ net/ipv6/raw.c	10 Jul 2003 23:18:04 -0000
@@ -602,7 +602,7 @@
 			fl.oif = sin6->sin6_scope_id;
 	} else {
 		if (sk->sk_state != TCP_ESTABLISHED) 
-			return(-EINVAL);
+			return -EDESTADDRREQ;
 		
 		proto = inet->num;
 		daddr = &np->daddr;
Index: net/ipv6/udp.c
===================================================================
RCS file: /cvs/tgr/linux-25/net/ipv6/udp.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 udp.c
--- net/ipv6/udp.c	9 Jul 2003 18:42:35 -0000	1.1.1.1
+++ net/ipv6/udp.c	10 Jul 2003 23:18:04 -0000
@@ -862,7 +862,7 @@
 			fl.oif = sin6->sin6_scope_id;
 	} else {
 		if (sk->sk_state != TCP_ESTABLISHED)
-			return -ENOTCONN;
+			return -EDESTADDRREQ;
 
 		up->dport = inet->dport;
 		daddr = &np->daddr;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
  2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2003-07-11  0:29   ` David S. Miller
  2003-07-11  0:41     ` YOSHIFUJI Hideaki / 吉藤英明
  2003-07-11  0:37   ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 1 reply; 6+ messages in thread
From: David S. Miller @ 2003-07-11  0:29 UTC (permalink / raw)
  To: yoshfuji; +Cc: netdev, tgraf

   From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
   Date: Fri, 11 Jul 2003 09:35:46 +0900 (JST)
   
   I aggeed on this, however we may want to do for whole tree at same time.
   How do you think, folks?

Sure, just send more patches relative to this one :-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
  2003-07-10 23:32 [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified Thomas Graf
@ 2003-07-11  0:29 ` David S. Miller
  2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 6+ messages in thread
From: David S. Miller @ 2003-07-11  0:29 UTC (permalink / raw)
  To: tgraf; +Cc: netdev

   From: Thomas Graf <tgraf@suug.ch>
   Date: Fri, 11 Jul 2003 01:32:23 +0200

   [EDESTADDRREQ]
       The socket is not connection-mode and does not have its peer
       address set, and no destination address was specified.
   
   fixes sendmsg in ipv{4,6}/{raw,udp}

Applied, thanks Thomas.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
  2003-07-10 23:32 [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified Thomas Graf
  2003-07-11  0:29 ` David S. Miller
@ 2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
  2003-07-11  0:29   ` David S. Miller
  2003-07-11  0:37   ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 2 replies; 6+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-07-11  0:35 UTC (permalink / raw)
  To: davem, netdev, yoshfuji; +Cc: tgraf

In article <20030710233223.GA30577@rei.rakuen> (at Fri, 11 Jul 2003 01:32:23 +0200), Thomas Graf <tgraf@suug.ch> says:

> [EDESTADDRREQ]
>     The socket is not connection-mode and does not have its peer
>     address set, and no destination address was specified.
> 
> fixes sendmsg in ipv{4,6}/{raw,udp}

I aggeed on this, however we may want to do for whole tree at same time.
How do you think, folks?

--yoshfuji

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
  2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
  2003-07-11  0:29   ` David S. Miller
@ 2003-07-11  0:37   ` YOSHIFUJI Hideaki / 吉藤英明
  1 sibling, 0 replies; 6+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-07-11  0:37 UTC (permalink / raw)
  To: davem, netdev, yoshfuji; +Cc: tgraf

In article <20030711.093546.12708723.yoshfuji@linux-ipv6.org> (at Fri, 11 Jul 2003 09:35:46 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> says:

> In article <20030710233223.GA30577@rei.rakuen> (at Fri, 11 Jul 2003 01:32:23 +0200), Thomas Graf <tgraf@suug.ch> says:
> 
> > [EDESTADDRREQ]
> >     The socket is not connection-mode and does not have its peer
> >     address set, and no destination address was specified.
> > 
> > fixes sendmsg in ipv{4,6}/{raw,udp}
> 
> I aggeed on this, however we may want to do for whole tree at same time.
    ~~~~~~agreed
> How do you think, folks?

--yoshfuji

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified
  2003-07-11  0:29   ` David S. Miller
@ 2003-07-11  0:41     ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 0 replies; 6+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2003-07-11  0:41 UTC (permalink / raw)
  To: davem; +Cc: netdev, tgraf

In article <20030710.172923.27804984.davem@redhat.com> (at Thu, 10 Jul 2003 17:29:23 -0700 (PDT)), "David S. Miller" <davem@redhat.com> says:

>    From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
>    Date: Fri, 11 Jul 2003 09:35:46 +0900 (JST)
>    
>    I aggeed on this, however we may want to do for whole tree at same time.
>    How do you think, folks?
> 
> Sure, just send more patches relative to this one :-)

Okay, I'll do this as much as I can do...

--yoshfuji

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-07-11  0:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-10 23:32 [PATCH] make sendmsg return EDESTADDRREQ if socket is not connected and daddr was not specified Thomas Graf
2003-07-11  0:29 ` David S. Miller
2003-07-11  0:35 ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-11  0:29   ` David S. Miller
2003-07-11  0:41     ` YOSHIFUJI Hideaki / 吉藤英明
2003-07-11  0:37   ` YOSHIFUJI Hideaki / 吉藤英明

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).