summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-05-29 13:37:04 +0000
committertuexen <tuexen@FreeBSD.org>2015-05-29 13:37:04 +0000
commit09fd91eb464129448de518f1425b1c648e75c141 (patch)
treebe91c3d0b21cf078c03e7ae5ba8949f2a78f036f
parenta2dbf980ab6181ee9f52258752226529b74378d2 (diff)
downloadFreeBSD-src-09fd91eb464129448de518f1425b1c648e75c141.zip
FreeBSD-src-09fd91eb464129448de518f1425b1c648e75c141.tar.gz
MFC r282810:
Ensure that the COOKIE-ACK can be sent over UDP if the COOKIE-ECHO was received over UDP. Thanks to Felix Weinrank for makeing me aware of the problem and to Irene Ruengeler for providing the fix.
-rw-r--r--sys/netinet/sctp_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 280ae4a..9a75058 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -2325,12 +2325,13 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
sctp_is_feature_on(inp, SCTP_PCB_FLAGS_AUTOCLOSE)) {
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL);
}
- /* calculate the RTT */
(void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
if ((netp) && (*netp)) {
+ /* calculate the RTT and set the encaps port */
(*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp,
&cookie->time_entered, sctp_align_unsafe_makecopy,
SCTP_RTT_FROM_NON_DATA);
+ (*netp)->port = port;
}
/* respond with a COOKIE-ACK */
sctp_send_cookie_ack(stcb);
OpenPOWER on IntegriCloud