Lines Matching refs:nh

207         NextHop *nh;  in manager_get_nexthop_by_id()  local
214 nh = hashmap_get(manager->nexthops_by_id, UINT32_TO_PTR(id)); in manager_get_nexthop_by_id()
215 if (!nh) in manager_get_nexthop_by_id()
219 *ret = nh; in manager_get_nexthop_by_id()
619 NextHop *nh; in link_request_static_nexthops() local
627 HASHMAP_FOREACH(nh, link->network->nexthops_by_section) { in link_request_static_nexthops()
628 if (only_ipv4 && nh->family != AF_INET) in link_request_static_nexthops()
631 r = link_request_nexthop(link, nh); in link_request_static_nexthops()
1000 static int nexthop_section_verify(NextHop *nh) { in nexthop_section_verify() argument
1001 if (section_is_invalid(nh->section)) in nexthop_section_verify()
1004 if (!hashmap_isempty(nh->group)) { in nexthop_section_verify()
1005 if (in_addr_is_set(nh->family, &nh->gw)) in nexthop_section_verify()
1009 nh->section->filename, nh->section->line); in nexthop_section_verify()
1011 if (nh->family != AF_UNSPEC) in nexthop_section_verify()
1015 nh->section->filename, nh->section->line); in nexthop_section_verify()
1017 if (nh->blackhole && in_addr_is_set(nh->family, &nh->gw)) in nexthop_section_verify()
1021 nh->section->filename, nh->section->line); in nexthop_section_verify()
1022 } else if (nh->family == AF_UNSPEC) in nexthop_section_verify()
1024 nh->family = AF_INET; in nexthop_section_verify()
1026 if (nh->blackhole && in_addr_is_set(nh->family, &nh->gw)) in nexthop_section_verify()
1030 nh->section->filename, nh->section->line); in nexthop_section_verify()
1032 if (nh->onlink < 0 && in_addr_is_set(nh->family, &nh->gw) && in nexthop_section_verify()
1033 ordered_hashmap_isempty(nh->network->addresses_by_section)) { in nexthop_section_verify()
1038 nh->section->filename); in nexthop_section_verify()
1039 nh->onlink = true; in nexthop_section_verify()
1042 if (nh->onlink >= 0) in nexthop_section_verify()
1043 SET_FLAG(nh->flags, RTNH_F_ONLINK, nh->onlink); in nexthop_section_verify()
1049 NextHop *nh; in network_drop_invalid_nexthops() local
1053 HASHMAP_FOREACH(nh, network->nexthops_by_section) in network_drop_invalid_nexthops()
1054 if (nexthop_section_verify(nh) < 0) in network_drop_invalid_nexthops()
1055 nexthop_free(nh); in network_drop_invalid_nexthops()