diff options
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 853a670f6df6..3314394f0aab 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -345,7 +345,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
345 | icmp_param->data.icmph.checksum = 0; | 345 | icmp_param->data.icmph.checksum = 0; |
346 | 346 | ||
347 | inet->tos = ip_hdr(skb)->tos; | 347 | inet->tos = ip_hdr(skb)->tos; |
348 | daddr = ipc.addr = rt->rt_src; | 348 | daddr = ipc.addr = ip_hdr(skb)->saddr; |
349 | ipc.opt = NULL; | 349 | ipc.opt = NULL; |
350 | ipc.tx_flags = 0; | 350 | ipc.tx_flags = 0; |
351 | if (icmp_param->replyopts.opt.opt.optlen) { | 351 | if (icmp_param->replyopts.opt.opt.optlen) { |
@@ -930,12 +930,12 @@ static void icmp_address_reply(struct sk_buff *skb) | |||
930 | BUG_ON(mp == NULL); | 930 | BUG_ON(mp == NULL); |
931 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { | 931 | for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { |
932 | if (*mp == ifa->ifa_mask && | 932 | if (*mp == ifa->ifa_mask && |
933 | inet_ifa_match(rt->rt_src, ifa)) | 933 | inet_ifa_match(ip_hdr(skb)->saddr, ifa)) |
934 | break; | 934 | break; |
935 | } | 935 | } |
936 | if (!ifa && net_ratelimit()) { | 936 | if (!ifa && net_ratelimit()) { |
937 | printk(KERN_INFO "Wrong address mask %pI4 from %s/%pI4\n", | 937 | printk(KERN_INFO "Wrong address mask %pI4 from %s/%pI4\n", |
938 | mp, dev->name, &rt->rt_src); | 938 | mp, dev->name, &ip_hdr(skb)->saddr); |
939 | } | 939 | } |
940 | } | 940 | } |
941 | } | 941 | } |