netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Per Liden <per.liden@ericsson.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Allan Stephens <allan.stephens@windriver.com>
Subject: [PATCH 3/14] [TIPC] Stream socket can now send > 66000 bytes at a time
Date: Fri, 13 Oct 2006 13:37:44 +0200	[thread overview]
Message-ID: <11607394753960-git-send-email-per.liden@ericsson.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0610131330350.30166@ulinpc219.uab.ericsson.se>

From: Allan Stephens <allan.stephens@windriver.com>

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>
---
 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 acfb852..ed900fe 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 *ioc
                         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 *ioc
 	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--) {
-- 
1.4.1


  parent reply	other threads:[~2006-10-13 11:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 11:37 [PATCH 0/14] TIPC updates Per Liden
2006-10-13 11:37 ` [PATCH 1/14] [TIPC] Add missing unlock in port timeout code Per Liden
2006-10-17  4:39   ` David Miller
2006-10-13 11:37 ` [PATCH 2/14] [TIPC] Debug print buffer enhancements and fixes Per Liden
2006-10-17  4:43   ` David Miller
2006-10-13 11:37 ` Per Liden [this message]
2006-10-17  4:44   ` [PATCH 3/14] [TIPC] Stream socket can now send > 66000 bytes at a time David Miller
2006-10-13 11:37 ` [PATCH 4/14] [TIPC] Added duplicate node address detection capability Per Liden
2006-10-17  4:45   ` David Miller
2006-10-13 11:37 ` [PATCH 5/14] [TIPC] Optimize wakeup logic when socket has no waiting processes Per Liden
2006-10-17  4:48   ` David Miller
2006-10-13 11:37 ` [PATCH 6/14] [TIPC] Remove code bloat introduced by print buffer rework Per Liden
2006-10-17  4:49   ` David Miller
2006-10-13 11:37 ` [PATCH 7/14] [TIPC] Add support for Ethernet VLANs Per Liden
2006-10-17  4:50   ` David Miller
2006-10-13 11:37 ` [PATCH 8/14] [TIPC] Fix socket receive queue NULL pointer dereference on SMP systems Per Liden
2006-10-17  4:55   ` David Miller
2006-10-13 11:37 ` [PATCH 9/14] [TIPC] Name publication events now delivered in chronological order Per Liden
2006-10-13 23:13   ` Bill Fink
2006-10-16  8:50     ` Per Liden
2006-10-16 20:59       ` David Miller
2006-10-17  4:56   ` David Miller
2006-10-13 11:37 ` [PATCH 10/14] [TIPC] Fixed slow link reactivation when link tolerance is large Per Liden
2006-10-17  4:57   ` David Miller
2006-10-13 11:37 ` [PATCH 11/14] [TIPC] Can now list multicast link on an isolated network node Per Liden
2006-10-17  4:58   ` David Miller
2006-10-13 11:37 ` [PATCH 12/14] [TIPC] Added subscription cancellation capability Per Liden
2006-10-17  5:00   ` David Miller
2006-10-13 11:37 ` [PATCH 13/14] [TIPC] Unrecognized configuration command now returns error message Per Liden
2006-10-17  5:01   ` David Miller
2006-10-13 11:37 ` [PATCH 14/14] [TIPC] Updated TIPC version number to 1.6.2 Per Liden
2006-10-17  5:01   ` David Miller
2006-10-17  5:04 ` [PATCH 0/14] TIPC updates David Miller
2006-10-18  8:24   ` Per Liden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11607394753960-git-send-email-per.liden@ericsson.com \
    --to=per.liden@ericsson.com \
    --cc=allan.stephens@windriver.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).