diff options
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 83318e727905..72199d149573 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -666,10 +666,13 @@ void sctp_assoc_del_peer(struct sctp_association *asoc, | |||
666 | struct list_head *pos; | 666 | struct list_head *pos; |
667 | struct list_head *temp; | 667 | struct list_head *temp; |
668 | struct sctp_transport *transport; | 668 | struct sctp_transport *transport; |
669 | union sctp_addr tmp; | ||
670 | |||
671 | flip_to_n(&tmp, addr); | ||
669 | 672 | ||
670 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 673 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
671 | transport = list_entry(pos, struct sctp_transport, transports); | 674 | transport = list_entry(pos, struct sctp_transport, transports); |
672 | if (sctp_cmp_addr_exact(addr, &transport->ipaddr_h)) { | 675 | if (sctp_cmp_addr_exact(&tmp, &transport->ipaddr)) { |
673 | /* Do book keeping for removing the peer and free it. */ | 676 | /* Do book keeping for removing the peer and free it. */ |
674 | sctp_assoc_rm_peer(asoc, transport); | 677 | sctp_assoc_rm_peer(asoc, transport); |
675 | break; | 678 | break; |
@@ -684,12 +687,14 @@ struct sctp_transport *sctp_assoc_lookup_paddr( | |||
684 | { | 687 | { |
685 | struct sctp_transport *t; | 688 | struct sctp_transport *t; |
686 | struct list_head *pos; | 689 | struct list_head *pos; |
690 | union sctp_addr tmp; | ||
687 | 691 | ||
692 | flip_to_n(&tmp, address); | ||
688 | /* Cycle through all transports searching for a peer address. */ | 693 | /* Cycle through all transports searching for a peer address. */ |
689 | 694 | ||
690 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 695 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
691 | t = list_entry(pos, struct sctp_transport, transports); | 696 | t = list_entry(pos, struct sctp_transport, transports); |
692 | if (sctp_cmp_addr_exact(address, &t->ipaddr_h)) | 697 | if (sctp_cmp_addr_exact(&tmp, &t->ipaddr)) |
693 | return t; | 698 | return t; |
694 | } | 699 | } |
695 | 700 | ||