Initialize all components of the sent COOKIE.
MFC after: 3 days.
This commit is contained in:
parent
e81522e7f1
commit
00f02b4aa3
@ -5711,6 +5711,8 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
stc.laddress[2] = 0;
|
||||
stc.laddress[3] = 0;
|
||||
stc.laddr_type = SCTP_IPV4_ADDRESS;
|
||||
/* scope_id is only for v6 */
|
||||
stc.scope_id = 0;
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
@ -5719,6 +5721,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
memcpy(&stc.address, &sin6->sin6_addr,
|
||||
sizeof(struct in6_addr));
|
||||
stc.addr_type = SCTP_IPV6_ADDRESS;
|
||||
stc.scope_id = sin6->sin6_scope_id;
|
||||
if (net->src_addr_selected == 0) {
|
||||
/*
|
||||
* strange case here, the INIT should have
|
||||
@ -5746,6 +5749,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
/* who are we */
|
||||
memcpy(stc.identification, SCTP_VERSION_STRING,
|
||||
min(strlen(SCTP_VERSION_STRING), sizeof(stc.identification)));
|
||||
memset(stc.reserved, 0, SCTP_RESERVE_SPACE);
|
||||
/* now the chunk header */
|
||||
initack->ch.chunk_type = SCTP_INITIATION_ACK;
|
||||
initack->ch.chunk_flags = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user