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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 99062f5f42e3..0aba759cb9b7 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -124,7 +124,6 @@ void sctp_snmp_proc_exit(void)
124/* Dump local addresses of an association/endpoint. */ 124/* Dump local addresses of an association/endpoint. */
125static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_common *epb) 125static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_common *epb)
126{ 126{
127 struct list_head *pos;
128 struct sctp_association *asoc; 127 struct sctp_association *asoc;
129 struct sctp_sockaddr_entry *laddr; 128 struct sctp_sockaddr_entry *laddr;
130 struct sctp_transport *peer; 129 struct sctp_transport *peer;
@@ -137,8 +136,7 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo
137 primary = &peer->saddr; 136 primary = &peer->saddr;
138 } 137 }
139 138
140 list_for_each(pos, &epb->bind_addr.address_list) { 139 list_for_each_entry(laddr, &epb->bind_addr.address_list, list) {
141 laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
142 addr = &laddr->a; 140 addr = &laddr->a;
143 af = sctp_get_af_specific(addr->sa.sa_family); 141 af = sctp_get_af_specific(addr->sa.sa_family);
144 if (primary && af->cmp_addr(addr, primary)) { 142 if (primary && af->cmp_addr(addr, primary)) {
@@ -151,14 +149,13 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo
151/* Dump remote addresses of an association. */ 149/* Dump remote addresses of an association. */
152static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_association *assoc) 150static void sctp_seq_dump_remote_addrs(struct seq_file *seq, struct sctp_association *assoc)
153{ 151{
154 struct list_head *pos;
155 struct sctp_transport *transport; 152 struct sctp_transport *transport;
156 union sctp_addr *addr, *primary; 153 union sctp_addr *addr, *primary;
157 struct sctp_af *af; 154 struct sctp_af *af;
158 155
159 primary = &assoc->peer.primary_addr; 156 primary = &assoc->peer.primary_addr;
160 list_for_each(pos, &assoc->peer.transport_addr_list) { 157 list_for_each_entry(transport, &assoc->peer.transport_addr_list,
161 transport = list_entry(pos, struct sctp_transport, transports); 158 transports) {
162 addr = &transport->ipaddr; 159 addr = &transport->ipaddr;
163 af = sctp_get_af_specific(addr->sa.sa_family); 160 af = sctp_get_af_specific(addr->sa.sa_family);
164 if (af->cmp_addr(addr, primary)) { 161 if (af->cmp_addr(addr, primary)) {