From: Shan Wei <shanwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH] sctp_test: don't specifc the destination address when sendint
Date: Fri, 03 Sep 2010 06:52:31 +0000 [thread overview]
Message-ID: <4C809B2F.3020904@cn.fujitsu.com> (raw)
For multi-home mode, don't need to specific msg_name.
If msg_name is set, this will force sctp send data to the destination address
to which msg_name is pointed.
So, this patch will cause sctp to choose primary path to send data.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
src/apps/sctp_test.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/apps/sctp_test.c b/src/apps/sctp_test.c
index 7287d05..7922686 100644
--- a/src/apps/sctp_test.c
+++ b/src/apps/sctp_test.c
@@ -1005,8 +1005,14 @@ int send_r(int sk, int stream, int order, int send_size, int assoc_i)
}
}
- outmsg.msg_name = &s_rem;
- outmsg.msg_namelen = sizeof(struct sockaddr_storage);
+ if (connectx_count != 0) {
+ outmsg.msg_name = NULL;
+ outmsg.msg_namelen = 0;
+ }
+ else {
+ outmsg.msg_name = &s_rem;
+ outmsg.msg_namelen = sizeof(struct sockaddr_storage);
+ }
outmsg.msg_iov = &iov;
outmsg.msg_iovlen = 1;
outmsg.msg_control = outcmsg;
--
1.6.3.3
reply other threads:[~2010-09-03 6:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4C809B2F.3020904@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=linux-sctp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.