summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-12 19:30:58 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-12 19:30:58 -0400
commitc30883bdff0b3544900a5c4aba18b8985436878f (patch)
tree3446d93477df0997410dc770a2a7f08e233025c2 /net/ipv4
parent10949550bd1e50cc91c0f5085f7080a44b0871fe (diff)
downloadop-kernel-dev-c30883bdff0b3544900a5c4aba18b8985436878f.zip
op-kernel-dev-c30883bdff0b3544900a5c4aba18b8985436878f.tar.gz
ipv4: Simplify iph->daddr overwrite in ip_options_rcv_srr().
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index e82c304..c5c2619 100644
--- 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) {
OpenPOWER on IntegriCloud