lksctp-tools: Fix -e option of sctp_darn
PATCH 1/3 lksctp-tools: Fix -e option of sctp_darn
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 <[email protected]>
--- src/apps/sctp_darn.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
src/apps/sctp_darn.c +2 -2
@@ -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);
Signature · 1 line
1.5.3.8