diff options
author | David S. Miller <davem@davemloft.net> | 2012-06-28 06:21:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-28 06:21:41 -0400 |
commit | 70e7341673a47fb1525cfc7d6651cc98b5348928 (patch) | |
tree | dfab978a554b6badff83381bf03c42543cd37eb6 /net/ipv4/ip_output.c | |
parent | 160eb5a6b14ca2eab5c598bdbbb24c24624bad34 (diff) |
ipv4: Show that ip_send_reply() is purely unicast routine.
Rename it to ip_send_unicast_reply() and add explicit 'saddr'
argument.
This removed one of the few users of rt->rt_spec_dst.
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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 0f3185a662c3..2630900e480a 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -1459,13 +1459,14 @@ static int ip_reply_glue_bits(void *dptr, char *to, int offset, | |||
1459 | 1459 | ||
1460 | /* | 1460 | /* |
1461 | * Generic function to send a packet as reply to another packet. | 1461 | * Generic function to send a packet as reply to another packet. |
1462 | * Used to send TCP resets so far. ICMP should use this function too. | 1462 | * Used to send TCP resets so far. |
1463 | * | 1463 | * |
1464 | * Should run single threaded per socket because it uses the sock | 1464 | * Should run single threaded per socket because it uses the sock |
1465 | * structure to pass arguments. | 1465 | * structure to pass arguments. |
1466 | */ | 1466 | */ |
1467 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr, | 1467 | void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr, |
1468 | const struct ip_reply_arg *arg, unsigned int len) | 1468 | __be32 saddr, const struct ip_reply_arg *arg, |
1469 | unsigned int len) | ||
1469 | { | 1470 | { |
1470 | struct inet_sock *inet = inet_sk(sk); | 1471 | struct inet_sock *inet = inet_sk(sk); |
1471 | struct ip_options_data replyopts; | 1472 | struct ip_options_data replyopts; |
@@ -1491,7 +1492,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr, | |||
1491 | RT_TOS(arg->tos), | 1492 | RT_TOS(arg->tos), |
1492 | RT_SCOPE_UNIVERSE, sk->sk_protocol, | 1493 | RT_SCOPE_UNIVERSE, sk->sk_protocol, |
1493 | ip_reply_arg_flowi_flags(arg), | 1494 | ip_reply_arg_flowi_flags(arg), |
1494 | daddr, rt->rt_spec_dst, | 1495 | daddr, saddr, |
1495 | tcp_hdr(skb)->source, tcp_hdr(skb)->dest); | 1496 | tcp_hdr(skb)->source, tcp_hdr(skb)->dest); |
1496 | security_skb_classify_flow(skb, flowi4_to_flowi(&fl4)); | 1497 | security_skb_classify_flow(skb, flowi4_to_flowi(&fl4)); |
1497 | rt = ip_route_output_key(sock_net(sk), &fl4); | 1498 | rt = ip_route_output_key(sock_net(sk), &fl4); |