Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 23:29:08 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r231473 - stable/8/sys/netinet
Message-ID:  <201202102329.q1ANT8Tl001830@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Feb 10 23:29:08 2012
New Revision: 231473
URL: http://svn.freebsd.org/changeset/base/231473

Log:
  MFC r226869:
  When add a new remote address using sctp_add_remote_addr(),
  return the correct net if requested.

Modified:
  stable/8/sys/netinet/sctp_pcb.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/8/sys/netinet/sctp_pcb.c	Fri Feb 10 23:26:43 2012	(r231472)
+++ stable/8/sys/netinet/sctp_pcb.c	Fri Feb 10 23:29:08 2012	(r231473)
@@ -4138,6 +4138,9 @@ sctp_add_remote_addr(struct sctp_tcb *st
 #ifdef INVARIANTS
 	net->flowidset = 1;
 #endif
+	if (netp) {
+		*netp = net;
+	}
 	netfirst = TAILQ_FIRST(&stcb->asoc.nets);
 	if (net->ro.ro_rt == NULL) {
 		/* Since we have no route put it at the back */
@@ -4209,9 +4212,6 @@ sctp_add_remote_addr(struct sctp_tcb *st
 		TAILQ_INSERT_HEAD(&stcb->asoc.nets,
 		    stcb->asoc.primary_destination, sctp_next);
 	}
-	if (netp) {
-		*netp = net;
-	}
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202102329.q1ANT8Tl001830>