diff options
author | tuexen <tuexen@FreeBSD.org> | 2015-05-12 08:08:16 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2015-05-12 08:08:16 +0000 |
commit | 02ec72fed7dda118514cc917ee4a9f8a2d7f7a13 (patch) | |
tree | 16473468b84b88a81f1ae4426c06e4d72ddf6dcb /sys/netinet | |
parent | f154af34529945fddb153724ea590d2014260085 (diff) | |
download | FreeBSD-src-02ec72fed7dda118514cc917ee4a9f8a2d7f7a13.zip FreeBSD-src-02ec72fed7dda118514cc917ee4a9f8a2d7f7a13.tar.gz |
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.
MFC after: 1 week
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/sctp_input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 4fab986..048dfd3 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); |