bp = &ep->base.bind_addr;
list_for_each(pos, &bp->address_list) {
addr = list_entry(pos, struct sctp_sockaddr_entry, list);
- if (sctp_has_association(&addr->a_h, paddr)) {
+ if (sctp_has_association(&addr->a, paddr)) {
sctp_read_unlock(&ep->base.addr_lock);
return 1;
}
{
struct sctp_association *asoc;
struct sctp_transport *transport;
- union sctp_addr tmp, tmp2;
- flip_to_n(&tmp, laddr);
- flip_to_n(&tmp2, paddr);
- if ((asoc = sctp_lookup_association(&tmp, &tmp2, &transport))) {
+ if ((asoc = sctp_lookup_association(laddr, paddr, &transport))) {
sctp_association_put(asoc);
return 1;
}
* make sure that there is no peeled-off association matching
* the peer address even on another socket.
*/
- if (sctp_endpoint_is_peeled_off(ep, &to)) {
+ if (sctp_endpoint_is_peeled_off(ep, sa_addr)) {
err = -EADDRNOTAVAIL;
goto out_free;
}
*/
if ((sctp_style(sk, TCP) &&
sctp_sstate(sk, ESTABLISHED)) ||
- sctp_endpoint_is_peeled_off(ep, &to)) {
+ sctp_endpoint_is_peeled_off(ep, &tmp)) {
err = -EADDRNOTAVAIL;
goto out_unlock;
}