From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH 1/3] lksctp-tools: Fix -e option of sctp_darn
Date: Fri, 09 Jan 2009 05:58:07 +0000 [thread overview]
Message-ID: <4966E76F.50304@cn.fujitsu.com> (raw)
If sctp_darn -e option is used, sctp_darn will send back different message
to which it received. This is because test_print_message() will change the
received message when print out it.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
src/apps/sctp_darn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/apps/sctp_darn.c b/src/apps/sctp_darn.c
index 14e864f..61673a2 100644
--- a/src/apps/sctp_darn.c
+++ b/src/apps/sctp_darn.c
@@ -720,7 +720,6 @@ command_listen(char *argv0, int sk)
}
break;
}
- test_print_message(sk, &inmessage, error);
/* Update the associd when a notification is received on a
* UDP-style socket.
@@ -730,12 +729,13 @@ command_listen(char *argv0, int sk)
if (echo) {
if( !(MSG_NOTIFICATION & inmessage.msg_flags)) {
- sendto(sk, inmessage.msg_iov->iov_base,
+ sendto(recvsk, inmessage.msg_iov->iov_base,
error, 0, (struct sockaddr *)&msgname,
sizeof(msgname));
}
}
+ test_print_message(sk, &inmessage, error);
inmessage.msg_control = incmsg;
inmessage.msg_controllen = sizeof(incmsg);
--
1.5.3.8
reply other threads:[~2009-01-09 5:58 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=4966E76F.50304@cn.fujitsu.com \
--to=yjwei@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.