mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-16 21:34:10 +00:00
When add a new remote address using sctp_add_remote_addr(),
return the correct net if requested. MFC after: 3 days.
This commit is contained in:
parent
a0fe4c5b36
commit
7ffa229018
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226869
|
@ -4138,6 +4138,9 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr,
|
|||
#ifdef INVARIANTS
|
||||
net->flowidset = 1;
|
||||
#endif
|
||||
if (netp) {
|
||||
*netp = net;
|
||||
}
|
||||
netfirst = TAILQ_FIRST(&stcb->asoc.nets);
|
||||
if (net->ro.ro_rt == NULL) {
|
||||
/* Since we have no route put it at the back */
|
||||
|
@ -4209,9 +4212,6 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr,
|
|||
TAILQ_INSERT_HEAD(&stcb->asoc.nets,
|
||||
stcb->asoc.primary_destination, sctp_next);
|
||||
}
|
||||
if (netp) {
|
||||
*netp = net;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue