diff options
author | tuexen <tuexen@FreeBSD.org> | 2011-10-10 12:28:47 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2011-10-10 12:28:47 +0000 |
commit | 43477149d38b14bb3538f7f104945c8a8f92b6c4 (patch) | |
tree | 8f323400bd8a65d47c2f1beb02154bd25802a674 /sys/netinet/sctp_pcb.c | |
parent | 3767cab953b1940acdabb4975eef32ac2485aae0 (diff) | |
download | FreeBSD-src-43477149d38b14bb3538f7f104945c8a8f92b6c4.zip FreeBSD-src-43477149d38b14bb3538f7f104945c8a8f92b6c4.tar.gz |
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.
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r-- | sys/netinet/sctp_pcb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index b04ee93..2b36ba4e 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -2786,6 +2786,9 @@ sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, 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; + } } } /* |