[NETFILTER]: nf_conntrack: Introduces nf_ct_get_tuplepr and uses it
[safe/jmp/linux-2.6] / net / ipv6 / icmp.c
index d3edc3c..4765a29 100644 (file)
@@ -272,7 +272,7 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st
        return 0;
 }
 
-#ifdef CONFIG_IPV6_MIP6
+#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
 static void mip6_addr_swap(struct sk_buff *skb)
 {
        struct ipv6hdr *iph = ipv6_hdr(skb);
@@ -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;
 }