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@xxxxxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html