aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r--net/sctp/proc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index bf0144ed3e3a..04faa4a706d4 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -155,17 +155,17 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo
155 if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { 155 if (epb->type == SCTP_EP_TYPE_ASSOCIATION) {
156 asoc = sctp_assoc(epb); 156 asoc = sctp_assoc(epb);
157 peer = asoc->peer.primary_path; 157 peer = asoc->peer.primary_path;
158 primary = &peer->saddr_h; 158 primary = &peer->saddr;
159 } 159 }
160 160
161 list_for_each(pos, &epb->bind_addr.address_list) { 161 list_for_each(pos, &epb->bind_addr.address_list) {
162 laddr = list_entry(pos, struct sctp_sockaddr_entry, list); 162 laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
163 addr = (union sctp_addr *)&laddr->a_h; 163 addr = &laddr->a;
164 af = sctp_get_af_specific(addr->sa.sa_family); 164 af = sctp_get_af_specific(addr->sa.sa_family);
165 if (primary && af->cmp_addr(addr, primary)) { 165 if (primary && af->cmp_addr(addr, primary)) {
166 seq_printf(seq, "*"); 166 seq_printf(seq, "*");
167 } 167 }
168 af->seq_dump_addr(seq, &laddr->a); 168 af->seq_dump_addr(seq, addr);
169 } 169 }
170} 170}
171 171
@@ -175,17 +175,19 @@ static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_associa
175 struct list_head *pos; 175 struct list_head *pos;
176 struct sctp_transport *transport; 176 struct sctp_transport *transport;
177 union sctp_addr *addr, *primary; 177 union sctp_addr *addr, *primary;
178 union sctp_addr tmp;
178 struct sctp_af *af; 179 struct sctp_af *af;
179 180
180 primary = &(assoc->peer.primary_addr); 181 primary = &(assoc->peer.primary_addr);
182 flip_to_n(&tmp, primary);
181 list_for_each(pos, &assoc->peer.transport_addr_list) { 183 list_for_each(pos, &assoc->peer.transport_addr_list) {
182 transport = list_entry(pos, struct sctp_transport, transports); 184 transport = list_entry(pos, struct sctp_transport, transports);
183 addr = (union sctp_addr *)&transport->ipaddr_h; 185 addr = &transport->ipaddr;
184 af = sctp_get_af_specific(addr->sa.sa_family); 186 af = sctp_get_af_specific(addr->sa.sa_family);
185 if (af->cmp_addr(addr, primary)) { 187 if (af->cmp_addr(addr, &tmp)) {
186 seq_printf(seq, "*"); 188 seq_printf(seq, "*");
187 } 189 }
188 af->seq_dump_addr(seq, &transport->ipaddr); 190 af->seq_dump_addr(seq, addr);
189 } 191 }
190} 192}
191 193