]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/devinet.c
tcp FRTO: Fix fallback to conventional recovery
[linux-2.6-omap-h63xx.git] / net / ipv4 / devinet.c
index 4a10dbbbe0a1a653a6440f37603c39303cb1aa16..6848e4760f3454910de56008226a10b5335a22e7 100644 (file)
@@ -165,7 +165,7 @@ static struct in_device *inetdev_init(struct net_device *dev)
        if (!in_dev)
                goto out;
        INIT_RCU_HEAD(&in_dev->rcu_head);
-       memcpy(&in_dev->cnf, dev->nd_net->ipv4.devconf_dflt,
+       memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt,
                        sizeof(in_dev->cnf));
        in_dev->cnf.sysctl = NULL;
        in_dev->dev = dev;
@@ -437,7 +437,7 @@ struct in_ifaddr *inet_ifa_byprefix(struct in_device *in_dev, __be32 prefix,
 
 static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        struct nlattr *tb[IFA_MAX+1];
        struct in_device *in_dev;
        struct ifaddrmsg *ifm;
@@ -552,7 +552,7 @@ errout:
 
 static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        struct in_ifaddr *ifa;
 
        ASSERT_RTNL();
@@ -872,7 +872,7 @@ __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope)
 {
        __be32 addr = 0;
        struct in_device *in_dev;
-       struct net *net = dev->nd_net;
+       struct net *net = dev_net(dev);
 
        rcu_read_lock();
        in_dev = __in_dev_get_rcu(dev);
@@ -974,7 +974,7 @@ __be32 inet_confirm_addr(struct in_device *in_dev,
        if (scope != RT_SCOPE_LINK)
                return confirm_addr_indev(in_dev, dst, local, scope);
 
-       net = in_dev->dev->nd_net;
+       net = dev_net(in_dev->dev);
        read_lock(&dev_base_lock);
        rcu_read_lock();
        for_each_netdev(net, dev) {
@@ -1158,7 +1158,7 @@ nla_put_failure:
 
 static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        int idx, ip_idx;
        struct net_device *dev;
        struct in_device *in_dev;
@@ -1203,7 +1203,7 @@ static void rtmsg_ifa(int event, struct in_ifaddr* ifa, struct nlmsghdr *nlh,
        int err = -ENOBUFS;
        struct net *net;
 
-       net = ifa->ifa_dev->dev->nd_net;
+       net = dev_net(ifa->ifa_dev->dev);
        skb = nlmsg_new(inet_nlmsg_size(), GFP_KERNEL);
        if (skb == NULL)
                goto errout;
@@ -1517,7 +1517,7 @@ static void devinet_sysctl_register(struct in_device *idev)
 {
        neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4,
                        NET_IPV4_NEIGH, "ipv4", NULL, NULL);
-       __devinet_sysctl_register(idev->dev->nd_net, idev->dev->name,
+       __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name,
                        idev->dev->ifindex, &idev->cnf);
 }