Skip to contentSkip to conversation

net: sctp: rework multihoming retransmission path selection to rfc4960

DISCUSSION Dave Jones 2 participants 2 messages Mar 6, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Dave Jones

author
#1 lore raw
Quoted 9 lines · Linux Kernel
Gitweb:     http://git.kernel.org/linus/;a=commit;h=4c47af4d5eb2c2f78f886079a3920a7078a6f0a0
Commit:     4c47af4d5eb2c2f78f886079a3920a7078a6f0a0
Parent:     b194c1f1dbd5f2671e49e0ac801b1b78dc7de93b
Author:     Daniel Borkmann <[email protected]>
AuthorDate: Thu Feb 20 20:51:06 2014 +0100
Committer:  David S. Miller <[email protected]>
CommitDate: Sat Feb 22 00:26:05 2014 -0500

net: sctp: rework multihoming retransmission path selection to rfc4960

minor nit that coverity just picked up..

Review

Quoted 12 lines
(quoted diff) +11 -0
+	/* Iterate from retran_path's successor back to retran_path. */
+	for (trans = list_next_entry(trans, transports); 1;
+	     trans = list_next_entry(trans, transports)) {
+		/* Manually skip the head element. */
+		if (&trans->transports == &asoc->peer.transport_addr_list)
+			continue;
+		if (trans->state == SCTP_UNCONFIRMED)
+			continue;
+		trans_next = sctp_trans_elect_best(trans, trans_next);
+		/* Active is good enough for immediate return. */
+		if (trans_next->state == SCTP_ACTIVE)
 			break;

^ trans_next dereference ...

Review

Quoted 7 lines
(quoted diff) +4 -0
+		/* We've reached the end, time to update path. */
+		if (trans == asoc->peer.retran_path)
 			break;
 	}
 
+	if (trans_next != NULL)
+		asoc->peer.retran_path = trans_next;

Belated NULL check.

Either the check is redundant, or it needs to be moved up.

Dave

#2 lore raw

On 03/06/2014 07:02 AM, Dave Jones wrote:
...

Quoted 1 line

Either the check is redundant, or it needs to be moved up.

Yep, first one.

I already have a patch in my local tree, will send it out some time this week.

Cheers,

Daniel