]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/ipv6: Rename addrconf_dst_alloc
authorDavid Ahern <dsahern@gmail.com>
Wed, 18 Apr 2018 22:39:00 +0000 (15:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2018 19:40:13 +0000 (15:40 -0400)
addrconf_dst_alloc now returns a fib6_info. Update the name
and its users to reflect the change.

Rename only; no functional change intended.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/addrconf.c
net/ipv6/anycast.c
net/ipv6/route.c

index b4b85109984f333428a6376a6ca5189de1782251..31e24f821ef63349dd8ebc5f9b1740a9c5aa8f09 100644 (file)
@@ -136,7 +136,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6);
 
 void fib6_force_start_gc(struct net *net);
 
-struct fib6_info *addrconf_dst_alloc(struct net *net, struct inet6_dev *idev,
+struct fib6_info *addrconf_f6i_alloc(struct net *net, struct inet6_dev *idev,
                                     const struct in6_addr *addr, bool anycast,
                                     gfp_t gfp_flags);
 
index f38ea829c28b138e695501b9ca42955021f74a39..e6dd886f8f1f8f522fc03ea9f7c228ad3f5b4232 100644 (file)
@@ -994,7 +994,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
        gfp_t gfp_flags = can_block ? GFP_KERNEL : GFP_ATOMIC;
        struct net *net = dev_net(idev->dev);
        struct inet6_ifaddr *ifa = NULL;
-       struct fib6_info *rt = NULL;
+       struct fib6_info *f6i = NULL;
        int err = 0;
        int addr_type = ipv6_addr_type(addr);
 
@@ -1036,16 +1036,16 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
                goto out;
        }
 
-       rt = addrconf_dst_alloc(net, idev, addr, false, gfp_flags);
-       if (IS_ERR(rt)) {
-               err = PTR_ERR(rt);
-               rt = NULL;
+       f6i = addrconf_f6i_alloc(net, idev, addr, false, gfp_flags);
+       if (IS_ERR(f6i)) {
+               err = PTR_ERR(f6i);
+               f6i = NULL;
                goto out;
        }
 
        if (net->ipv6.devconf_all->disable_policy ||
            idev->cnf.disable_policy)
-               rt->dst_nopolicy = true;
+               f6i->dst_nopolicy = true;
 
        neigh_parms_data_state_setall(idev->nd_parms);
 
@@ -1067,7 +1067,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
        ifa->cstamp = ifa->tstamp = jiffies;
        ifa->tokenized = false;
 
-       ifa->rt = rt;
+       ifa->rt = f6i;
 
        ifa->idev = idev;
        in6_dev_hold(idev);
@@ -1101,7 +1101,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
        inet6addr_notifier_call_chain(NETDEV_UP, ifa);
 out:
        if (unlikely(err < 0)) {
-               fib6_info_release(rt);
+               fib6_info_release(f6i);
 
                if (ifa) {
                        if (ifa->idev)
@@ -3346,17 +3346,17 @@ static int fixup_permanent_addr(struct net *net,
         * case regenerate the host route.
         */
        if (!ifp->rt || !ifp->rt->fib6_node) {
-               struct fib6_info *rt, *prev;
+               struct fib6_info *f6i, *prev;
 
-               rt = addrconf_dst_alloc(net, idev, &ifp->addr, false,
-                                       GFP_ATOMIC);
-               if (IS_ERR(rt))
-                       return PTR_ERR(rt);
+               f6i = addrconf_f6i_alloc(net, idev, &ifp->addr, false,
+                                        GFP_ATOMIC);
+               if (IS_ERR(f6i))
+                       return PTR_ERR(f6i);
 
                /* ifp->rt can be accessed outside of rtnl */
                spin_lock(&ifp->lock);
                prev = ifp->rt;
-               ifp->rt = rt;
+               ifp->rt = f6i;
                spin_unlock(&ifp->lock);
 
                fib6_info_release(prev);
index eed3bf63bd056bbfa503ecbed88f432f12e549c5..5c3e74d050181e7e23629489d2d054f39f4a19b9 100644 (file)
@@ -247,7 +247,7 @@ static struct ifacaddr6 *aca_alloc(struct fib6_info *f6i,
 int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr)
 {
        struct ifacaddr6 *aca;
-       struct fib6_info *rt;
+       struct fib6_info *f6i;
        struct net *net;
        int err;
 
@@ -268,14 +268,14 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr)
        }
 
        net = dev_net(idev->dev);
-       rt = addrconf_dst_alloc(net, idev, addr, true, GFP_ATOMIC);
-       if (IS_ERR(rt)) {
-               err = PTR_ERR(rt);
+       f6i = addrconf_f6i_alloc(net, idev, addr, true, GFP_ATOMIC);
+       if (IS_ERR(f6i)) {
+               err = PTR_ERR(f6i);
                goto out;
        }
-       aca = aca_alloc(rt, addr);
+       aca = aca_alloc(f6i, addr);
        if (!aca) {
-               fib6_info_release(rt);
+               fib6_info_release(f6i);
                err = -ENOMEM;
                goto out;
        }
@@ -289,7 +289,7 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr)
        aca_get(aca);
        write_unlock_bh(&idev->lock);
 
-       ip6_ins_rt(net, rt);
+       ip6_ins_rt(net, f6i);
 
        addrconf_join_solict(idev->dev, &aca->aca_addr);
 
index e23ab0784e656ac346efc6bf729bed44d928462c..e44f82848143e7df29896e40442fecdcf2aebb96 100644 (file)
@@ -3591,44 +3591,44 @@ static int ip6_pkt_prohibit_out(struct net *net, struct sock *sk, struct sk_buff
  *     Allocate a dst for local (unicast / anycast) address.
  */
 
-struct fib6_info *addrconf_dst_alloc(struct net *net,
-                                   struct inet6_dev *idev,
-                                   const struct in6_addr *addr,
-                                   bool anycast, gfp_t gfp_flags)
+struct fib6_info *addrconf_f6i_alloc(struct net *net,
+                                    struct inet6_dev *idev,
+                                    const struct in6_addr *addr,
+                                    bool anycast, gfp_t gfp_flags)
 {
        u32 tb_id;
        struct net_device *dev = idev->dev;
-       struct fib6_info *rt;
+       struct fib6_info *f6i;
 
-       rt = fib6_info_alloc(gfp_flags);
-       if (!rt)
+       f6i = fib6_info_alloc(gfp_flags);
+       if (!f6i)
                return ERR_PTR(-ENOMEM);
 
-       rt->dst_nocount = true;
+       f6i->dst_nocount = true;
 
        in6_dev_hold(idev);
-       rt->fib6_idev = idev;
+       f6i->fib6_idev = idev;
 
-       rt->dst_host = true;
-       rt->fib6_protocol = RTPROT_KERNEL;
-       rt->fib6_flags = RTF_UP | RTF_NONEXTHOP;
+       f6i->dst_host = true;
+       f6i->fib6_protocol = RTPROT_KERNEL;
+       f6i->fib6_flags = RTF_UP | RTF_NONEXTHOP;
        if (anycast) {
-               rt->fib6_type = RTN_ANYCAST;
-               rt->fib6_flags |= RTF_ANYCAST;
+               f6i->fib6_type = RTN_ANYCAST;
+               f6i->fib6_flags |= RTF_ANYCAST;
        } else {
-               rt->fib6_type = RTN_LOCAL;
-               rt->fib6_flags |= RTF_LOCAL;
+               f6i->fib6_type = RTN_LOCAL;
+               f6i->fib6_flags |= RTF_LOCAL;
        }
 
-       rt->fib6_nh.nh_gw = *addr;
+       f6i->fib6_nh.nh_gw = *addr;
        dev_hold(dev);
-       rt->fib6_nh.nh_dev = dev;
-       rt->fib6_dst.addr = *addr;
-       rt->fib6_dst.plen = 128;
+       f6i->fib6_nh.nh_dev = dev;
+       f6i->fib6_dst.addr = *addr;
+       f6i->fib6_dst.plen = 128;
        tb_id = l3mdev_fib_table(idev->dev) ? : RT6_TABLE_LOCAL;
-       rt->fib6_table = fib6_get_table(net, tb_id);
+       f6i->fib6_table = fib6_get_table(net, tb_id);
 
-       return rt;
+       return f6i;
 }
 
 /* remove deleted ip from prefsrc entries */