svn commit: r226965 - stable/9/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon Oct 31 09:27:11 UTC 2011


Author: tuexen
Date: Mon Oct 31 09:27:10 2011
New Revision: 226965
URL: http://svn.freebsd.org/changeset/base/226965

Log:
  MFC 226869:
  When adding a new remote address using sctp_add_remote_addr(),
  return the correct net if requested.
  
  Approved by: re@

Modified:
  stable/9/sys/netinet/sctp_pcb.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/9/sys/netinet/sctp_pcb.c	Mon Oct 31 09:22:09 2011	(r226964)
+++ stable/9/sys/netinet/sctp_pcb.c	Mon Oct 31 09:27:10 2011	(r226965)
@@ -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);
 }
 


More information about the svn-src-stable-9 mailing list