diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-20 20:05:23 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:26:32 -0500 |
commit | 5f242a13e8505e0f3efd3113da6e029f6e7dfa32 (patch) | |
tree | 5c9a7de99887bde11fd16e1bfaf2543b358f8727 /net/sctp/proc.c | |
parent | c604e368a477ed1f7dd532605a8f1990d2b128ee (diff) |
[SCTP]: Switch ->cmp_addr() and sctp_cmp_addr_exact() to net-endian.
instances of ->cmp_addr() are fine with switching both arguments
to net-endian; callers other than in sctp_cmp_addr_exact() (both
as ->cmp_addr(...) and direct calls of instances) adjusted;
sctp_cmp_addr_exact() switched to net-endian itself and adjustment
is done in its callers
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r-- | net/sctp/proc.c | 14 |
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 | ||