Skip to contentSkip to conversation

sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe

PATCH New Zhu Yanjun 4 participants 5 messages Aug 20, 2014 – Aug 22, 2014

Subsystems (3)
lore
Share & tools
lore
author
#1 lore raw

PATCH 1/1 sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe

In reply to 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.

---
 net/sctp/associola.c | 1 +
 1 file changed, 1 insertion(+)
net/sctp/associola.c +1 -0
index 9de23a2..2e23f6b 100644
@@ -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

Zhu Yanjun

author
#0 lore raw

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
Acked-by on v1 1/1
#2 lore raw
In reply to Zhu Yanjun
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.

Thanks
-vlad

Quoted 17 lines
---
 net/sctp/associola.c | 1 +
 1 file changed, 1 insertion(+)
net/sctp/associola.c +1 -0
index 9de23a2..2e23f6b 100644
@@ -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;
Acked-by on v1 1/1
#3 lore raw
In reply to Zhu Yanjun
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.

Looks a bit better, thanks!

maintainer Applied
#4 lore raw
In reply to Zhu Yanjun

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.

Applied, thanks.