* all is not right with the world...
@ 2007-12-10 0:19 David Stevens
2007-12-10 1:52 ` David Stevens
2007-12-10 6:20 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: David Stevens @ 2007-12-10 0:19 UTC (permalink / raw)
To: yoshfuji, davem; +Cc: netdev
I don't know if you've fixed it already, but I was writing some
UDPv6 tests in 2.6.23.9 and was getting EDESTADDRREQ unexpectedly. When
I looked at the kernel code, I found:
gerrit/wscott 1.115 | int udpv6_sendmsg(struct kiocb *iocb,
struct sock *sk,
shemminger 1.57 | struct
msghdr *msg, size_t len)
torvalds 1.1 | {
...
yoshfuji 1.53 | } else if (!up->pending)
{
yoshfuji 1.53 | if
(sk->sk_state != TCP_ESTABLISHED)
yoshfuji 1.53 | return -EDESTADDRREQ;
yoshfuji 1.53 | daddr =
&np->daddr;
I wouldn't expect a UDP socket to be setting
sk_state to TCP_ESTABLISHED...
+-DLS
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: all is not right with the world...
2007-12-10 0:19 all is not right with the world David Stevens
@ 2007-12-10 1:52 ` David Stevens
2007-12-10 6:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Stevens @ 2007-12-10 1:52 UTC (permalink / raw)
To: David Stevens; +Cc: davem, netdev, netdev-owner, yoshfuji
Never mind...
Though I hate the "TCP" in the name (maybe overload UDP_CONNECTED?), I see
datagram
sockets are in fact setting it, and my EDESTADDRREQ was a bug in my test
program. :-)
+-DLS
netdev-owner@vger.kernel.org wrote on 12/09/2007 04:19:12 PM:
> I don't know if you've fixed it already, but I was writing some
> UDPv6 tests in 2.6.23.9 and was getting EDESTADDRREQ unexpectedly. When
> I looked at the kernel code, I found:
>
> gerrit/wscott 1.115 | int udpv6_sendmsg(struct kiocb *iocb,
> struct sock *sk,
> shemminger 1.57 | struct
> msghdr *msg, size_t len)
> torvalds 1.1 | {
> ...
>
> yoshfuji 1.53 | } else if
(!up->pending)
> {
> yoshfuji 1.53 | if
> (sk->sk_state != TCP_ESTABLISHED)
> yoshfuji 1.53 | return -EDESTADDRREQ;
> yoshfuji 1.53 | daddr =
> &np->daddr;
>
> I wouldn't expect a UDP socket to be setting
> sk_state to TCP_ESTABLISHED...
>
> +-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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: all is not right with the world...
2007-12-10 0:19 all is not right with the world David Stevens
2007-12-10 1:52 ` David Stevens
@ 2007-12-10 6:20 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2007-12-10 6:20 UTC (permalink / raw)
To: dlstevens; +Cc: yoshfuji, netdev
From: David Stevens <dlstevens@us.ibm.com>
Date: Sun, 9 Dec 2007 16:19:12 -0800
> I don't know if you've fixed it already, but I was writing some
> UDPv6 tests in 2.6.23.9 and was getting EDESTADDRREQ unexpectedly. When
> I looked at the kernel code, I found:
>
> gerrit/wscott 1.115 | int udpv6_sendmsg(struct kiocb *iocb,
> struct sock *sk,
> shemminger 1.57 | struct
> msghdr *msg, size_t len)
> torvalds 1.1 | {
> ...
>
> yoshfuji 1.53 | } else if (!up->pending)
> {
> yoshfuji 1.53 | if
> (sk->sk_state != TCP_ESTABLISHED)
> yoshfuji 1.53 | return -EDESTADDRREQ;
> yoshfuji 1.53 | daddr =
> &np->daddr;
>
> I wouldn't expect a UDP socket to be setting
> sk_state to TCP_ESTABLISHED...
It does when you connect() it.
UDP reuses the TCP state values out of convenience.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-10 6:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-10 0:19 all is not right with the world David Stevens
2007-12-10 1:52 ` David Stevens
2007-12-10 6:20 ` David Miller
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).