projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1094955
)
ipv4: Simplify iph->daddr overwrite in ip_options_rcv_srr().
author
David S. Miller
<davem@davemloft.net>
Thu, 12 May 2011 23:30:58 +0000
(19:30 -0400)
committer
David S. Miller
<davem@davemloft.net>
Thu, 12 May 2011 23:30:58 +0000
(19:30 -0400)
We already copy the 4-byte nexthop from the options block into
local variable "nexthop" for the route lookup.
Re-use that variable instead of memcpy()'ing again when assigning
to iph->daddr after the route lookup succeeds.
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_options.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/ip_options.c
b/net/ipv4/ip_options.c
index e82c304806bb41c0997074c56c919baa101d0786..c5c26192b05713e8f1fa463e8af670f08dc0a34c 100644
(file)
--- a/
net/ipv4/ip_options.c
+++ b/
net/ipv4/ip_options.c
@@
-635,7
+635,7
@@
int ip_options_rcv_srr(struct sk_buff *skb)
if (rt2->rt_type != RTN_LOCAL)
break;
/* Superfast 8) loopback forward */
-
memcpy(&iph->daddr, &optptr[srrptr-1], 4)
;
+
iph->daddr = nexthop
;
opt->is_changed = 1;
}
if (srrptr <= srrspace) {