IB/mlx4: Correct max_srq_wr returned from mlx4_ib_query_device()
[powerpc.git] / net / ipv6 / icmp.c
index d3edc3c..e9bcce9 100644 (file)
@@ -317,7 +317,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
        int hlimit, tclass;
        int err = 0;
 
-       if ((u8*)hdr < skb->head || (u8*)(hdr+1) > skb->tail)
+       if ((u8 *)hdr < skb->head ||
+           (skb->network_header + sizeof(*hdr)) > skb->tail)
                return;
 
        /*
@@ -731,7 +732,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
                 */
 
                icmpv6_notify(skb, type, hdr->icmp6_code, hdr->icmp6_mtu);
-       };
+       }
+
        kfree_skb(skb);
        return 0;
 
@@ -864,7 +866,7 @@ int icmpv6_err_convert(int type, int code, int *err)
        case ICMPV6_TIME_EXCEED:
                *err = EHOSTUNREACH;
                break;
-       };
+       }
 
        return fatal;
 }