diff options
| -rwxr-xr-x | usrsctplib/netinet/sctp_pcb.c | 6 | ||||
| -rwxr-xr-x | usrsctplib/netinet/sctp_usrreq.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/usrsctplib/netinet/sctp_pcb.c b/usrsctplib/netinet/sctp_pcb.c index c264db5..fdd1ddf 100755 --- a/usrsctplib/netinet/sctp_pcb.c +++ b/usrsctplib/netinet/sctp_pcb.c @@ -32,7 +32,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 295805 2016-02-19 11:25:18Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 297361 2016-03-28 19:31:10Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -6173,6 +6173,7 @@ void sctp_add_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa, uint32_t action) { struct sctp_laddr *laddr; + struct sctp_tcb *stcb; int fnd, error = 0; fnd = 0; @@ -6231,6 +6232,9 @@ sctp_add_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa, uint32_t ac default: break; } + LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { + sctp_add_local_addr_restricted(stcb, ifa); + } } return; } diff --git a/usrsctplib/netinet/sctp_usrreq.c b/usrsctplib/netinet/sctp_usrreq.c index d426761..33a7584 100755 --- a/usrsctplib/netinet/sctp_usrreq.c +++ b/usrsctplib/netinet/sctp_usrreq.c @@ -32,7 +32,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 297312 2016-03-27 10:04:25Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 297362 2016-03-28 19:32:13Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -6624,6 +6624,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, __func__); continue; } + if ((sctp_is_addr_restricted(stcb, laddr->ifa)) && + (!sctp_is_addr_pending(stcb, laddr->ifa))) { + continue; + } if (laddr->ifa == ifa) { found = 1; break; |
