projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4141ddc
)
sctp: Move sctp_v4_dst_saddr out of loop
author
Gui Jianfeng
<
[email protected]
>
Wed, 4 Jun 2008 19:38:07 +0000
(12:38 -0700)
committer
David S. Miller
<
[email protected]
>
Wed, 4 Jun 2008 19:38:07 +0000
(12:38 -0700)
There's no need to execute sctp_v4_dst_saddr() for each
iteration, just move it out of loop.
Signed-off-by: Gui Jianfeng <
[email protected]
>
Signed-off-by: Vlad Yasevich <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/sctp/protocol.c
patch
|
blob
|
history
diff --git
a/net/sctp/protocol.c
b/net/sctp/protocol.c
index 13ee7fa92e07ff3341409ef1ff7039ae1bb36016..56bdaf7fc4257407cda3670d5453281c37212270 100644
(file)
--- a/
net/sctp/protocol.c
+++ b/
net/sctp/protocol.c
@@
-470,11
+470,11
@@
static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
/* Walk through the bind address list and look for a bind
* address that matches the source address of the returned dst.
*/
+ sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port));
rcu_read_lock();
list_for_each_entry_rcu(laddr, &bp->address_list, list) {
if (!laddr->valid || (laddr->state != SCTP_ADDR_SRC))
continue;
- sctp_v4_dst_saddr(&dst_saddr, dst, htons(bp->port));
if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a))
goto out_unlock;
}