diff options
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index ff124d40c585..4d70c21c50aa 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -392,7 +392,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
392 | icmp_param->data.icmph.checksum = 0; | 392 | icmp_param->data.icmph.checksum = 0; |
393 | icmp_out_count(icmp_param->data.icmph.type); | 393 | icmp_out_count(icmp_param->data.icmph.type); |
394 | 394 | ||
395 | inet->tos = skb->nh.iph->tos; | 395 | inet->tos = ip_hdr(skb)->tos; |
396 | daddr = ipc.addr = rt->rt_src; | 396 | daddr = ipc.addr = rt->rt_src; |
397 | ipc.opt = NULL; | 397 | ipc.opt = NULL; |
398 | if (icmp_param->replyopts.optlen) { | 398 | if (icmp_param->replyopts.optlen) { |
@@ -404,7 +404,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
404 | struct flowi fl = { .nl_u = { .ip4_u = | 404 | struct flowi fl = { .nl_u = { .ip4_u = |
405 | { .daddr = daddr, | 405 | { .daddr = daddr, |
406 | .saddr = rt->rt_spec_dst, | 406 | .saddr = rt->rt_spec_dst, |
407 | .tos = RT_TOS(skb->nh.iph->tos) } }, | 407 | .tos = RT_TOS(ip_hdr(skb)->tos) } }, |
408 | .proto = IPPROTO_ICMP }; | 408 | .proto = IPPROTO_ICMP }; |
409 | security_skb_classify_flow(skb, &fl); | 409 | security_skb_classify_flow(skb, &fl); |
410 | if (ip_route_output_key(&rt, &fl)) | 410 | if (ip_route_output_key(&rt, &fl)) |
@@ -448,7 +448,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
448 | * Check this, icmp_send is called from the most obscure devices | 448 | * Check this, icmp_send is called from the most obscure devices |
449 | * sometimes. | 449 | * sometimes. |
450 | */ | 450 | */ |
451 | iph = skb_in->nh.iph; | 451 | iph = ip_hdr(skb_in); |
452 | 452 | ||
453 | if ((u8 *)iph < skb_in->head || (u8 *)(iph + 1) > skb_in->tail) | 453 | if ((u8 *)iph < skb_in->head || (u8 *)(iph + 1) > skb_in->tail) |
454 | goto out; | 454 | goto out; |
@@ -676,7 +676,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
676 | printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP " | 676 | printk(KERN_WARNING "%u.%u.%u.%u sent an invalid ICMP " |
677 | "type %u, code %u " | 677 | "type %u, code %u " |
678 | "error to a broadcast: %u.%u.%u.%u on %s\n", | 678 | "error to a broadcast: %u.%u.%u.%u on %s\n", |
679 | NIPQUAD(skb->nh.iph->saddr), | 679 | NIPQUAD(ip_hdr(skb)->saddr), |
680 | icmph->type, icmph->code, | 680 | icmph->type, icmph->code, |
681 | NIPQUAD(iph->daddr), | 681 | NIPQUAD(iph->daddr), |
682 | skb->dev->name); | 682 | skb->dev->name); |
@@ -751,7 +751,7 @@ static void icmp_redirect(struct sk_buff *skb) | |||
751 | */ | 751 | */ |
752 | case ICMP_REDIR_HOST: | 752 | case ICMP_REDIR_HOST: |
753 | case ICMP_REDIR_HOSTTOS: | 753 | case ICMP_REDIR_HOSTTOS: |
754 | ip_rt_redirect(skb->nh.iph->saddr, iph->daddr, | 754 | ip_rt_redirect(ip_hdr(skb)->saddr, iph->daddr, |
755 | skb->h.icmph->un.gateway, | 755 | skb->h.icmph->un.gateway, |
756 | iph->saddr, skb->dev); | 756 | iph->saddr, skb->dev); |
757 | break; | 757 | break; |