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:
a16a0d2
)
ipv4: optimize fib_compute_spec_dst call in ip_options_echo
author
Julian Anastasov
<
[email protected]
>
Wed, 18 Jul 2012 21:34:24 +0000
(21:34 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 19 Jul 2012 15:30:49 +0000
(08:30 -0700)
Move fib_compute_spec_dst at the only place where it
is needed.
Signed-off-by: Julian Anastasov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_options.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_options.c
b/net/ipv4/ip_options.c
index a19d6471a318addedaa714a890b55930735ba27e..1dc01f9793d59120a713213e7e65cc855bfb37b9 100644
(file)
--- a/
net/ipv4/ip_options.c
+++ b/
net/ipv4/ip_options.c
@@
-93,7
+93,6
@@
int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
unsigned char *sptr, *dptr;
int soffset, doffset;
int optlen;
- __be32 daddr;
memset(dopt, 0, sizeof(struct ip_options));
@@
-105,8
+104,6
@@
int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
sptr = skb_network_header(skb);
dptr = dopt->__data;
- daddr = fib_compute_spec_dst(skb);
-
if (sopt->rr) {
optlen = sptr[sopt->rr+1];
soffset = sptr[sopt->rr+2];
@@
-180,6
+177,8
@@
int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb)
doffset -= 4;
}
if (doffset > 3) {
+ __be32 daddr = fib_compute_spec_dst(skb);
+
memcpy(&start[doffset-1], &daddr, 4);
dopt->faddr = faddr;
dptr[0] = start[0];