nfsd4: don't check ip address in setclientid
[safe/jmp/linux-2.6] / net / ipv4 / fib_frontend.c
index 0f1557a..741e4fa 100644 (file)
@@ -5,8 +5,6 @@
  *
  *             IPv4 Forwarding Information Base: FIB frontend.
  *
- * Version:    $Id: fib_frontend.c,v 1.26 2001/10/31 21:55:54 davem Exp $
- *
  * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
  *
  *             This program is free software; you can redistribute it and/or
@@ -146,7 +144,7 @@ static void fib_flush(struct net *net)
        }
 
        if (flushed)
-               rt_cache_flush(-1);
+               rt_cache_flush(net, -1);
 }
 
 /*
@@ -506,7 +504,6 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX+1] = {
        [RTA_PREFSRC]           = { .type = NLA_U32 },
        [RTA_METRICS]           = { .type = NLA_NESTED },
        [RTA_MULTIPATH]         = { .len = sizeof(struct rtnexthop) },
-       [RTA_PROTOINFO]         = { .type = NLA_U32 },
        [RTA_FLOW]              = { .type = NLA_U32 },
 };
 
@@ -581,7 +578,7 @@ errout:
        return err;
 }
 
-static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdrnlh, void *arg)
+static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
        struct net *net = sock_net(skb->sk);
        struct fib_config cfg;
@@ -603,7 +600,7 @@ errout:
        return err;
 }
 
-static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdrnlh, void *arg)
+static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
        struct net *net = sock_net(skb->sk);
        struct fib_config cfg;
@@ -900,21 +897,22 @@ static void fib_disable_ip(struct net_device *dev, int force)
 {
        if (fib_sync_down_dev(dev, force))
                fib_flush(dev_net(dev));
-       rt_cache_flush(0);
+       rt_cache_flush(dev_net(dev), 0);
        arp_ifdown(dev);
 }
 
 static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-       struct in_ifaddr *ifa = (struct in_ifaddr*)ptr;
+       struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
+       struct net_device *dev = ifa->ifa_dev->dev;
 
        switch (event) {
        case NETDEV_UP:
                fib_add_ifaddr(ifa);
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
-               fib_sync_up(ifa->ifa_dev->dev);
+               fib_sync_up(dev);
 #endif
-               rt_cache_flush(-1);
+               rt_cache_flush(dev_net(dev), -1);
                break;
        case NETDEV_DOWN:
                fib_del_ifaddr(ifa);
@@ -922,9 +920,9 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
                        /* Last address was deleted from this interface.
                           Disable IP.
                         */
-                       fib_disable_ip(ifa->ifa_dev->dev, 1);
+                       fib_disable_ip(dev, 1);
                } else {
-                       rt_cache_flush(-1);
+                       rt_cache_flush(dev_net(dev), -1);
                }
                break;
        }
@@ -952,25 +950,25 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
                fib_sync_up(dev);
 #endif
-               rt_cache_flush(-1);
+               rt_cache_flush(dev_net(dev), -1);
                break;
        case NETDEV_DOWN:
                fib_disable_ip(dev, 0);
                break;
        case NETDEV_CHANGEMTU:
        case NETDEV_CHANGE:
-               rt_cache_flush(0);
+               rt_cache_flush(dev_net(dev), 0);
                break;
        }
        return NOTIFY_DONE;
 }
 
 static struct notifier_block fib_inetaddr_notifier = {
-       .notifier_call =fib_inetaddr_event,
+       .notifier_call = fib_inetaddr_event,
 };
 
 static struct notifier_block fib_netdev_notifier = {
-       .notifier_call =fib_netdev_event,
+       .notifier_call = fib_netdev_event,
 };
 
 static int __net_init ip_fib_net_init(struct net *net)