diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index acfb852e7c98..ed900fe96bdf 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * net/tipc/socket.c: TIPC socket API | 2 | * net/tipc/socket.c: TIPC socket API |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2006, Ericsson AB | 4 | * Copyright (c) 2001-2006, Ericsson AB |
5 | * Copyright (c) 2004-2005, Wind River Systems | 5 | * Copyright (c) 2004-2006, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
@@ -629,6 +629,9 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, | |||
629 | return -ENOTCONN; | 629 | return -ENOTCONN; |
630 | } | 630 | } |
631 | 631 | ||
632 | if (unlikely(m->msg_name)) | ||
633 | return -EISCONN; | ||
634 | |||
632 | /* | 635 | /* |
633 | * Send each iovec entry using one or more messages | 636 | * Send each iovec entry using one or more messages |
634 | * | 637 | * |
@@ -641,6 +644,8 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, | |||
641 | curr_iovlen = m->msg_iovlen; | 644 | curr_iovlen = m->msg_iovlen; |
642 | my_msg.msg_iov = &my_iov; | 645 | my_msg.msg_iov = &my_iov; |
643 | my_msg.msg_iovlen = 1; | 646 | my_msg.msg_iovlen = 1; |
647 | my_msg.msg_flags = m->msg_flags; | ||
648 | my_msg.msg_name = NULL; | ||
644 | bytes_sent = 0; | 649 | bytes_sent = 0; |
645 | 650 | ||
646 | while (curr_iovlen--) { | 651 | while (curr_iovlen--) { |