nfsd4: don't check ip address in setclientid
[safe/jmp/linux-2.6] / net / ipv4 / icmp.c
index 21e497e..fc562d2 100644 (file)
@@ -321,12 +321,12 @@ static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
 }
 
 static void icmp_push_reply(struct icmp_bxm *icmp_param,
-                           struct ipcm_cookie *ipc, struct rtable *rt)
+                           struct ipcm_cookie *ipc, struct rtable **rt)
 {
        struct sock *sk;
        struct sk_buff *skb;
 
-       sk = icmp_sk(dev_net(rt->u.dst.dev));
+       sk = icmp_sk(dev_net((*rt)->u.dst.dev));
        if (ip_append_data(sk, icmp_glue_bits, icmp_param,
                           icmp_param->data_len+icmp_param->head_len,
                           icmp_param->head_len,
@@ -392,7 +392,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
        }
        if (icmpv4_xrlim_allow(net, rt, icmp_param->data.icmph.type,
                               icmp_param->data.icmph.code))
-               icmp_push_reply(icmp_param, &ipc, rt);
+               icmp_push_reply(icmp_param, &ipc, &rt);
        ip_rt_put(rt);
 out_unlock:
        icmp_xmit_unlock(sk);
@@ -562,7 +562,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
                /* No need to clone since we're just using its address. */
                rt2 = rt;
 
-               err = xfrm_lookup((struct dst_entry **)&rt, &fl, NULL, 0);
+               err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0);
                switch (err) {
                case 0:
                        if (rt != rt2)
@@ -601,7 +601,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
                if (err)
                        goto relookup_failed;
 
-               err = xfrm_lookup((struct dst_entry **)&rt2, &fl, NULL,
+               err = xfrm_lookup(net, (struct dst_entry **)&rt2, &fl, NULL,
                                  XFRM_LOOKUP_ICMP);
                switch (err) {
                case 0:
@@ -635,7 +635,7 @@ route_done:
                icmp_param.data_len = room;
        icmp_param.head_len = sizeof(struct icmphdr);
 
-       icmp_push_reply(&icmp_param, &ipc, rt);
+       icmp_push_reply(&icmp_param, &ipc, &rt);
 ende:
        ip_rt_put(rt);
 out_unlock:
@@ -1205,7 +1205,7 @@ static struct pernet_operations __net_initdata icmp_sk_ops = {
 
 int __init icmp_init(void)
 {
-       return register_pernet_device(&icmp_sk_ops);
+       return register_pernet_subsys(&icmp_sk_ops);
 }
 
 EXPORT_SYMBOL(icmp_err_convert);