Skip to content

Commit 46306b4

Browse files
Li RongQingdavem330
authored andcommitted
ipv6: unneccessary to get address prefix in addrconf_get_prefix_route
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>
1 parent 71a1d9e commit 46306b4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/ipv6/addrconf.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -995,12 +995,9 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
995995
* --yoshfuji
996996
*/
997997
if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) {
998-
struct in6_addr prefix;
999998
struct rt6_info *rt;
1000999

1001-
ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
1002-
1003-
rt = addrconf_get_prefix_route(&prefix,
1000+
rt = addrconf_get_prefix_route(&ifp->addr,
10041001
ifp->prefix_len,
10051002
ifp->idev->dev,
10061003
0, RTF_GATEWAY | RTF_DEFAULT);

0 commit comments

Comments
 (0)