ipv6: unneccessary to get address prefix in addrconf_get_prefix_route
authorLi RongQing <roy.qing.li@gmail.com>
Mon, 23 Dec 2013 01:32:38 +0000 (09:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 18:37:46 +0000 (13:37 -0500)
Since addrconf_get_prefix_route inputs the address prefix to fib6_locate,
which does not uses the data which is out of the prefix_len length,
so do not need to use ipv6_addr_prefix to get address prefix.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c

index cd2d7d0fb558be1d3c02f3419a2fb3cc9e6e9a09..9418ca375132657e1fd52889727bec1db1f4bd8e 100644 (file)
@@ -995,12 +995,9 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
         * --yoshfuji
         */
        if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) {
-               struct in6_addr prefix;
                struct rt6_info *rt;
 
-               ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
-
-               rt = addrconf_get_prefix_route(&prefix,
+               rt = addrconf_get_prefix_route(&ifp->addr,
                                               ifp->prefix_len,
                                               ifp->idev->dev,
                                               0, RTF_GATEWAY | RTF_DEFAULT);