diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2006-10-17 06:43:54 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-19 04:55:15 +0200 |
commit | eb5959c2bd290bf6c24ddf6d1f5ebcb496c54adb (patch) | |
tree | 57b7ce657f2304eeb4ad981cdbf7fcd8c7b6c8df /net/tipc | |
parent | [TIPC]: Debug print buffer enhancements and fixes (diff) | |
download | linux-eb5959c2bd290bf6c24ddf6d1f5ebcb496c54adb.tar.xz linux-eb5959c2bd290bf6c24ddf6d1f5ebcb496c54adb.zip |
[TIPC]: Stream socket can now send > 66000 bytes at a time
The stream socket send code was not initializing some required fields
of the temporary msghdr structure it was utilizing; this is now fixed.
A check has also been added to detect if a user illegally specifies
a destination address when sending on an established stream connection.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 @@ * net/tipc/socket.c: TIPC socket API * * Copyright (c) 2001-2006, Ericsson AB - * Copyright (c) 2004-2005, Wind River Systems + * Copyright (c) 2004-2006, Wind River Systems * All rights reserved. * * 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, return -ENOTCONN; } + if (unlikely(m->msg_name)) + return -EISCONN; + /* * Send each iovec entry using one or more messages * @@ -641,6 +644,8 @@ static int send_stream(struct kiocb *iocb, struct socket *sock, curr_iovlen = m->msg_iovlen; my_msg.msg_iov = &my_iov; my_msg.msg_iovlen = 1; + my_msg.msg_flags = m->msg_flags; + my_msg.msg_name = NULL; bytes_sent = 0; while (curr_iovlen--) { |