Lines Matching refs:score
1522 struct ipv6_saddr_score *score, in ipv6_get_saddr_eval() argument
1528 if (i <= score->rule) { in ipv6_get_saddr_eval()
1531 ret = score->scopedist; in ipv6_get_saddr_eval()
1534 ret = score->matchlen; in ipv6_get_saddr_eval()
1537 ret = !!test_bit(i, score->scorebits); in ipv6_get_saddr_eval()
1545 ret = !!score->ifa; in ipv6_get_saddr_eval()
1549 ret = ipv6_addr_equal(&score->ifa->addr, dst->addr); in ipv6_get_saddr_eval()
1573 ret = __ipv6_addr_src_scope(score->addr_type); in ipv6_get_saddr_eval()
1578 score->scopedist = ret; in ipv6_get_saddr_eval()
1585 if (!ipv6_use_optimistic_addr(net, score->ifa->idev)) in ipv6_get_saddr_eval()
1587 ret = ipv6_saddr_preferred(score->addr_type) || in ipv6_get_saddr_eval()
1588 !(score->ifa->flags & avoid); in ipv6_get_saddr_eval()
1596 ret = !(score->ifa->flags & IFA_F_HOMEADDRESS) ^ prefhome; in ipv6_get_saddr_eval()
1603 dst->ifindex == score->ifa->idev->dev->ifindex); in ipv6_get_saddr_eval()
1608 &score->ifa->addr, score->addr_type, in ipv6_get_saddr_eval()
1609 score->ifa->idev->dev->ifindex) == dst->label; in ipv6_get_saddr_eval()
1618 score->ifa->idev->cnf.use_tempaddr >= 2; in ipv6_get_saddr_eval()
1619 ret = (!(score->ifa->flags & IFA_F_TEMPORARY)) ^ preftmp; in ipv6_get_saddr_eval()
1626 ret = !(ipv6_addr_orchid(&score->ifa->addr) ^ in ipv6_get_saddr_eval()
1631 ret = ipv6_addr_diff(&score->ifa->addr, dst->addr); in ipv6_get_saddr_eval()
1632 if (ret > score->ifa->prefix_len) in ipv6_get_saddr_eval()
1633 ret = score->ifa->prefix_len; in ipv6_get_saddr_eval()
1634 score->matchlen = ret; in ipv6_get_saddr_eval()
1641 ret = !(score->ifa->flags & IFA_F_OPTIMISTIC); in ipv6_get_saddr_eval()
1649 __set_bit(i, score->scorebits); in ipv6_get_saddr_eval()
1650 score->rule = i; in ipv6_get_saddr_eval()
1661 struct ipv6_saddr_score *score = &scores[1 - hiscore_idx], *hiscore = &scores[hiscore_idx]; in __ipv6_dev_get_saddr() local
1663 list_for_each_entry_rcu(score->ifa, &idev->addr_list, if_list) { in __ipv6_dev_get_saddr()
1676 if ((score->ifa->flags & IFA_F_TENTATIVE) && in __ipv6_dev_get_saddr()
1677 (!(score->ifa->flags & IFA_F_OPTIMISTIC))) in __ipv6_dev_get_saddr()
1680 score->addr_type = __ipv6_addr_type(&score->ifa->addr); in __ipv6_dev_get_saddr()
1682 if (unlikely(score->addr_type == IPV6_ADDR_ANY || in __ipv6_dev_get_saddr()
1683 score->addr_type & IPV6_ADDR_MULTICAST)) { in __ipv6_dev_get_saddr()
1689 score->rule = -1; in __ipv6_dev_get_saddr()
1690 bitmap_zero(score->scorebits, IPV6_SADDR_RULE_MAX); in __ipv6_dev_get_saddr()
1696 miniscore = ipv6_get_saddr_eval(net, score, dst, i); in __ipv6_dev_get_saddr()
1700 score->scopedist > 0) { in __ipv6_dev_get_saddr()
1713 swap(hiscore, score); in __ipv6_dev_get_saddr()
1717 score->ifa = hiscore->ifa; in __ipv6_dev_get_saddr()