Commit dacfa425 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents bc6e5443 6e14891f
...@@ -1513,13 +1513,18 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, ...@@ -1513,13 +1513,18 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock, static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
struct msghdr *msg, size_t len) struct msghdr *msg, size_t len)
{ {
int err;
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
err = sock_error(sk);
if (err)
return err;
if (sk->sk_state != TCP_ESTABLISHED) if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN; return -ENOTCONN;
if (msg->msg_name || msg->msg_namelen) if (msg->msg_namelen)
return -EINVAL; msg->msg_namelen = 0;
return unix_dgram_sendmsg(kiocb, sock, msg, len); return unix_dgram_sendmsg(kiocb, sock, msg, len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment