sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe
Subsystems (3)
PATCH 1/1 sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe
In reply to Zhu YanjunSince the transport has always been in state SCTP_UNCONFIRMED, it therefore wasn't active before and hasn't been used before, and it always has been, so it is unnecessary to bug the user with a notification.
--- net/sctp/associola.c | 1 + 1 file changed, 1 insertion(+)
net/sctp/associola.c +1 -0
@@ -813,6 +813,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,else {dst_release (transport->dst); transport->dst =NULL ; + ulp_notify = false; } spc_state =SCTP_ADDR_UNREACHABLE ;
Signature · 1 line
1.9.1
PATCH v2 1/1 sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe
Hi, Vlad && Deepak && Michael && David && Daniel
V2: Following the advice from Daniel Borkmann, I modified the comments and short log.
Quoted 1 line
From Michael && Deepak
"
lxr SCTP implementation, doesn't transit the path state to INACTIVE, if it was never confirmed. this leads to SCTP_PEER_ADDRESS_CHANGE notification after each failed probe from this time. Is there any specific reason to have same notification to SCTP User with each probe in RTO time period ?
806 case SCTP_TRANSPORT_DOWN:
807 /* If the transport was never confirmed, do not transition it
808 * to inactive state. Also, release the cached route since
809 * there may be a better route next time.
810 */
811 if (transport->state != SCTP_UNCONFIRMED)
812 transport->state = SCTP_INACTIVE;
http://lxr.free-electrons.com/source/net/sctp/associola.c#L806
......
I would also only expect a SCTP_PEER_ADDRESS_CHANGE notification when a path state changes, not on every try.
"
I made a patch to disable sending SCTP_PEER_ADDRESS_CHANGE notification every try. Now the patch is in the attachment. Please check it.
Zhu Yanjun
Zhu Yanjun (1):
sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe
net/sctp/associola.c | 1 + 1 file changed, 1 insertion(+)
Signature · 1 line
1.9.1
Quoted 10 lines · Zhu Yanjun
Since the transport has always been in state
SCTP_UNCONFIRMED, it therefore wasn't active before and hasn't been used before, and it always has been, so it is unnecessary to bug the user with a notification.Reported-by Deepak Khandelwal <[email protected]>Suggested-by Vlad Yasevich <[email protected]>Suggested-by Michael Tuexen <[email protected]>Suggested-by Daniel Borkmann <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>
Thanks
-vlad
Quoted 17 lines
--- net/sctp/associola.c | 1 + 1 file changed, 1 insertion(+)net/sctp/associola.c +1
-0@@ -813,6 +813,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,else {dst_release (transport->dst); transport->dst =NULL ; + ulp_notify = false; } spc_state =SCTP_ADDR_UNREACHABLE ;
Quoted 10 lines · Zhu Yanjun
Since the transport has always been in state
SCTP_UNCONFIRMED, it therefore wasn't active before and hasn't been used before, and it always has been, so it is unnecessary to bug the user with a notification.Reported-by Deepak Khandelwal <[email protected]>Suggested-by Vlad Yasevich <[email protected]>Suggested-by Michael Tuexen <[email protected]>Suggested-by Daniel Borkmann <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>
Looks a bit better, thanks!
From: Zhu Yanjun <[email protected]>
Date: Wed, 20 Aug 2014 17:31:43 +0800
Quoted 10 lines
Since the transport has always been in state
SCTP_UNCONFIRMED, it therefore wasn't active before and hasn't been used before, and it always has been, so it is unnecessary to bug the user with a notification.Reported-by Deepak Khandelwal <[email protected]>Suggested-by Vlad Yasevich <[email protected]>Suggested-by Michael Tuexen <[email protected]>Suggested-by Daniel Borkmann <[email protected]>Signed-off-by Zhu Yanjun <[email protected]>
Applied, thanks.