diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-09 16:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-10 16:32:46 -0400 |
commit | 0a5ebb8000c5362be368df9d197943deb06b6916 (patch) | |
tree | 63910ddcbd4672dd7705e524a3db8f1324233365 /net/ipv4/ip_output.c | |
parent | 1c3319fb69c29376fe23c1aa0cd7cb6df91c7883 (diff) |
ipv4: Pass explicit daddr arg to ip_send_reply().
This eliminates an access to rt->rt_src.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index cd89d22902a9..70778d48aa7b 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -1459,20 +1459,19 @@ static int ip_reply_glue_bits(void *dptr, char *to, int offset, | |||
1459 | * Should run single threaded per socket because it uses the sock | 1459 | * Should run single threaded per socket because it uses the sock |
1460 | * structure to pass arguments. | 1460 | * structure to pass arguments. |
1461 | */ | 1461 | */ |
1462 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, | 1462 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr, |
1463 | unsigned int len) | 1463 | struct ip_reply_arg *arg, unsigned int len) |
1464 | { | 1464 | { |
1465 | struct inet_sock *inet = inet_sk(sk); | 1465 | struct inet_sock *inet = inet_sk(sk); |
1466 | struct ip_options_data replyopts; | 1466 | struct ip_options_data replyopts; |
1467 | struct ipcm_cookie ipc; | 1467 | struct ipcm_cookie ipc; |
1468 | struct flowi4 fl4; | 1468 | struct flowi4 fl4; |
1469 | __be32 daddr; | ||
1470 | struct rtable *rt = skb_rtable(skb); | 1469 | struct rtable *rt = skb_rtable(skb); |
1471 | 1470 | ||
1472 | if (ip_options_echo(&replyopts.opt.opt, skb)) | 1471 | if (ip_options_echo(&replyopts.opt.opt, skb)) |
1473 | return; | 1472 | return; |
1474 | 1473 | ||
1475 | daddr = ipc.addr = rt->rt_src; | 1474 | ipc.addr = daddr; |
1476 | ipc.opt = NULL; | 1475 | ipc.opt = NULL; |
1477 | ipc.tx_flags = 0; | 1476 | ipc.tx_flags = 0; |
1478 | 1477 | ||