Skip to contentSkip to conversation

sctp: not send SCTP_PEER_ADDR_CHANGE notifications with failed probe

PATCH In review Zhu Yanjun 2 participants 3 messages Aug 15, 2014 – Aug 18, 2014

Subsystems (3)
lore
Share & tools
lore

Zhu Yanjun

author
#0 lore raw

Hi, Vlad && DEEPAK && Michael && David

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

we checked RFC and here it is mentioned as Path Verification Section(5.4) of RFC 4960 http://tools.ietf.org/html/rfc4960

In each RTO, a probe may be sent on an active UNCONFIRMED path in an attempt to move it to the CONFIRMED state. If during this probing the path becomes inactive, this rate is lowered to the normal HEARTBEAT rate. At the expiration of the RTO timer, the error counter of any path that was probed but not CONFIRMED is incremented by one and subjected to path failure detection, as defined in Section

8.2
. When probing UNCONFIRMED addresses, however, the association overall error counter is not incremented

Does this mean that in attempt to move a UNCONFIRMED path to CONFIRMED State, the path can become INACTIVE, when transport error counter reaches to path_max_retrans counter ? I would say that the path stays UNCONFIRMED.

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
author
#1 lore raw

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

When a failed probe comes along UNCONFIRMED path, it is not necessary to send SCTP_PEER_ADDR_CHANGE 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
#2 lore raw
Quoted 2 lines · Zhu Yanjun

When a failed probe comes along UNCONFIRMED path, it is not necessary to send SCTP_PEER_ADDR_CHANGE notification.

I do not find this in the RFC, but it seems reasonable - at least, I would have liked to see a more elaborate commit message from you explaining why it's okay to do; at least RFC6458 I read:

SCTP_ADDR_UNREACHABLE:

The address specified can no longer be reached. Any data sent to this address is rerouted to an alternate until this address becomes reachable. This notification is provided whenever an address *becomes* unreachable.

Given that the transport has always been in state SCTP_UNCONFIRMED, it therefore wasn't active before and hasn't been used before, and one could argue that it doesn't "become" "unreachable" but always has been, so we wouldn't need to bug the user with a notification about it.

Quoted 1 line

Nit: please write names normally: Deepak Khandelwal

Quoted 20 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;