svn commit: r226203 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon Oct 10 12:28:47 UTC 2011


Author: tuexen
Date: Mon Oct 10 12:28:47 2011
New Revision: 226203
URL: http://svn.freebsd.org/changeset/base/226203

Log:
  When moving an stcb to a new inp and we copy over the list of
  bound addresses, update the last used address pointer.
  If not, it might result in a crash if the old inp goes away.
  
  MFC after: 3 days.

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Mon Oct 10 12:27:40 2011	(r226202)
+++ head/sys/netinet/sctp_pcb.c	Mon Oct 10 12:28:47 2011	(r226203)
@@ -2786,6 +2786,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpc
 			LIST_INSERT_HEAD(&new_inp->sctp_addr_list, laddr,
 			    sctp_nxt_addr);
 			new_inp->laddr_count++;
+			if (oladdr == stcb->asoc.last_used_address) {
+				stcb->asoc.last_used_address = laddr;
+			}
 		}
 	}
 	/*


More information about the svn-src-head mailing list