Fix a bug where endpoints bound to wildcard addresses where
using addresses not announced to the peer due to address scoping. MFC after: 3 weeks
This commit is contained in:
parent
9c0ef6d5b8
commit
87a37484eb
@ -2740,6 +2740,15 @@ sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn,
|
||||
}
|
||||
}
|
||||
if (stcb) {
|
||||
if (sctp_is_address_in_scope(ifa,
|
||||
stcb->asoc.ipv4_addr_legal,
|
||||
stcb->asoc.ipv6_addr_legal,
|
||||
stcb->asoc.loopback_scope,
|
||||
stcb->asoc.ipv4_local_scope,
|
||||
stcb->asoc.local_scope,
|
||||
stcb->asoc.site_scope, 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
if (((non_asoc_addr_ok == 0) &&
|
||||
(sctp_is_addr_restricted(stcb, sifa))) ||
|
||||
(non_asoc_addr_ok &&
|
||||
@ -2783,6 +2792,15 @@ sctp_count_num_preferred_boundall(struct sctp_ifn *ifn,
|
||||
continue;
|
||||
}
|
||||
if (stcb) {
|
||||
if (sctp_is_address_in_scope(ifa,
|
||||
stcb->asoc.ipv4_addr_legal,
|
||||
stcb->asoc.ipv6_addr_legal,
|
||||
stcb->asoc.loopback_scope,
|
||||
stcb->asoc.ipv4_local_scope,
|
||||
stcb->asoc.local_scope,
|
||||
stcb->asoc.site_scope, 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
if (((non_asoc_addr_ok == 0) &&
|
||||
(sctp_is_addr_restricted(stcb, sifa))) ||
|
||||
(non_asoc_addr_ok &&
|
||||
@ -2963,6 +2981,15 @@ sctp_choose_boundall(struct sctp_inpcb *inp,
|
||||
if (sifa == NULL)
|
||||
continue;
|
||||
if (stcb) {
|
||||
if (sctp_is_address_in_scope(sifa,
|
||||
stcb->asoc.ipv4_addr_legal,
|
||||
stcb->asoc.ipv6_addr_legal,
|
||||
stcb->asoc.loopback_scope,
|
||||
stcb->asoc.ipv4_local_scope,
|
||||
stcb->asoc.local_scope,
|
||||
stcb->asoc.site_scope, 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
if (((non_asoc_addr_ok == 0) &&
|
||||
(sctp_is_addr_restricted(stcb, sifa))) ||
|
||||
(non_asoc_addr_ok &&
|
||||
@ -3005,6 +3032,15 @@ sctp_choose_boundall(struct sctp_inpcb *inp,
|
||||
if (sifa == NULL)
|
||||
continue;
|
||||
if (stcb) {
|
||||
if (sctp_is_address_in_scope(sifa,
|
||||
stcb->asoc.ipv4_addr_legal,
|
||||
stcb->asoc.ipv6_addr_legal,
|
||||
stcb->asoc.loopback_scope,
|
||||
stcb->asoc.ipv4_local_scope,
|
||||
stcb->asoc.local_scope,
|
||||
stcb->asoc.site_scope, 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
if (((non_asoc_addr_ok == 0) &&
|
||||
(sctp_is_addr_restricted(stcb, sifa))) ||
|
||||
(non_asoc_addr_ok &&
|
||||
|
Loading…
Reference in New Issue
Block a user