|
34 | 34 |
|
35 | 35 | #ifdef __FreeBSD__
|
36 | 36 | #include <sys/cdefs.h>
|
37 |
| -__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 368593 2020-12-12 22:23:45Z tuexen $"); |
| 37 | +__FBSDID("$FreeBSD: head/sys/netinet/sctp_input.c 368622 2020-12-13 23:51:51Z tuexen $"); |
38 | 38 | #endif
|
39 | 39 |
|
40 | 40 | #include <netinet/sctp_os.h>
|
@@ -1898,7 +1898,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
1898 | 1898 | NULL);
|
1899 | 1899 | }
|
1900 | 1900 | asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd);
|
1901 |
| - asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); |
| 1901 | + if (asoc->pre_open_streams < asoc->streamoutcnt) { |
| 1902 | + asoc->pre_open_streams = asoc->streamoutcnt; |
| 1903 | + } |
1902 | 1904 |
|
1903 | 1905 | if (ntohl(init_cp->init.initiate_tag) != asoc->peer_vtag) {
|
1904 | 1906 | /* Ok the peer probably discarded our
|
@@ -2052,8 +2054,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
|
2052 | 2054 | /* move to OPEN state, if not in SHUTDOWN_SENT */
|
2053 | 2055 | SCTP_SET_STATE(stcb, SCTP_STATE_OPEN);
|
2054 | 2056 | }
|
2055 |
| - asoc->pre_open_streams = |
2056 |
| - ntohs(initack_cp->init.num_outbound_streams); |
| 2057 | + if (asoc->pre_open_streams < asoc->streamoutcnt) { |
| 2058 | + asoc->pre_open_streams = asoc->streamoutcnt; |
| 2059 | + } |
2057 | 2060 | asoc->init_seq_number = ntohl(initack_cp->init.initial_tsn);
|
2058 | 2061 | asoc->sending_seq = asoc->asconf_seq_out = asoc->str_reset_seq_out = asoc->init_seq_number;
|
2059 | 2062 | asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1;
|
@@ -2373,7 +2376,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
|
2373 | 2376 | /* process the INIT-ACK info (my info) */
|
2374 | 2377 | asoc->my_vtag = ntohl(initack_cp->init.initiate_tag);
|
2375 | 2378 | asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd);
|
2376 |
| - asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); |
2377 | 2379 | asoc->init_seq_number = ntohl(initack_cp->init.initial_tsn);
|
2378 | 2380 | asoc->sending_seq = asoc->asconf_seq_out = asoc->str_reset_seq_out = asoc->init_seq_number;
|
2379 | 2381 | asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1;
|
|
0 commit comments