787
788
789
790
791
792
793
794
795
796
797
798
799
800
801 if ((ifp->flags & IFA_F_PERMANENT) && onlink < 1) {
802 struct in6_addr prefix;
803 struct rt6_info *rt;
804 struct net *net = dev_net(ifp->idev->dev);
805 ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
806 rt = rt6_lookup(net, &prefix, NULL, ifp->idev->dev->ifindex, 1);
807
808 if (rt && addrconf_is_prefix_route(rt)) {
809 if (onlink == 0) {
810 ip6_del_rt(rt);
811 rt = NULL;
812 } else if (!(rt->rt6i_flags & RTF_EXPIRES)) {
813 rt->rt6i_expires = expires;
814 rt->rt6i_flags |= RTF_EXPIRES;
815 }
816 }
817 dst_release(&rt->u.dst);
818 }
819
820 in6_ifa_put(ifp);
821}
822
823#ifdef CONFIG_IPV6_PRIVACY
824static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *ift)
825{
826 struct inet6_dev *idev = ifp->idev;
827 struct in6_addr addr, *tmpaddr;