mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Bugfix: Make sure that the COMM_UP notificatin is delivered first also
on the passive side. MFC after: 3 days.
This commit is contained in:
parent
0a80a2de2b
commit
2fad0e55b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216887
@ -2311,6 +2311,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
int notification = 0;
|
||||
struct sctp_nets *netl;
|
||||
int had_a_existing_tcb = 0;
|
||||
int send_int_conf = 0;
|
||||
|
||||
SCTPDBG(SCTP_DEBUG_INPUT2,
|
||||
"sctp_handle_cookie: handling COOKIE-ECHO\n");
|
||||
@ -2630,8 +2631,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
netl->dest_state &= ~SCTP_ADDR_UNCONFIRMED;
|
||||
(void)sctp_set_primary_addr((*stcb), (struct sockaddr *)NULL,
|
||||
netl);
|
||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||
send_int_conf = 1;
|
||||
}
|
||||
}
|
||||
if (*stcb) {
|
||||
@ -2655,6 +2655,10 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
* socket, no need to do anything. I THINK!!
|
||||
*/
|
||||
sctp_ulp_notify(notification, *stcb, 0, (void *)&sac_restart_id, SCTP_SO_NOT_LOCKED);
|
||||
if (send_int_conf) {
|
||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
return (m);
|
||||
}
|
||||
oso = (*inp_p)->sctp_socket;
|
||||
@ -2766,7 +2770,10 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
/* Switch over to the new guy */
|
||||
*inp_p = inp;
|
||||
sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
|
||||
|
||||
if (send_int_conf) {
|
||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
/*
|
||||
* Pull it from the incomplete queue and wake the
|
||||
* guy
|
||||
@ -2785,8 +2792,14 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
|
||||
return (m);
|
||||
}
|
||||
}
|
||||
if ((notification) && ((*inp_p)->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE)) {
|
||||
sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
|
||||
if ((*inp_p)->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) {
|
||||
if (notification) {
|
||||
sctp_ulp_notify(notification, *stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
if (send_int_conf) {
|
||||
sctp_ulp_notify(SCTP_NOTIFY_INTERFACE_CONFIRMED,
|
||||
(*stcb), 0, (void *)netl, SCTP_SO_NOT_LOCKED);
|
||||
}
|
||||
}
|
||||
return (m);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user