Lines Matching refs:route

86         Route *route;  in ndisc_remove()  local
91 SET_FOREACH(route, link->routes) { in ndisc_remove()
92 if (route->source != NETWORK_CONFIG_SOURCE_NDISC) in ndisc_remove()
94 if (!route_is_marked(route)) in ndisc_remove()
96 if (router && !in6_addr_equal(router, &route->provider.in6)) in ndisc_remove()
99 k = route_remove(route); in ndisc_remove()
103 route_cancel_request(route, link); in ndisc_remove()
206 …sc_route_handler(sd_netlink *rtnl, sd_netlink_message *m, Request *req, Link *link, Route *route) { in ndisc_route_handler() argument
223 _cleanup_(route_freep) Route *route = in; in ndisc_request_route()
228 assert(route); in ndisc_request_route()
236 route->source = NETWORK_CONFIG_SOURCE_NDISC; in ndisc_request_route()
237 route->provider.in6 = router; in ndisc_request_route()
238 if (!route->table_set) in ndisc_request_route()
239 route->table = link_get_ipv6_accept_ra_route_table(link); in ndisc_request_route()
240 if (!route->priority_set) in ndisc_request_route()
241 route->priority = link->network->ipv6_accept_ra_route_metric; in ndisc_request_route()
242 if (!route->protocol_set) in ndisc_request_route()
243 route->protocol = RTPROT_RA; in ndisc_request_route()
245 if (route_get(NULL, link, route, &existing) < 0) in ndisc_request_route()
250 return link_request_route(link, TAKE_PTR(route), true, &link->ndisc_messages, in ndisc_request_route()
351 _cleanup_(route_freep) Route *route = NULL; in ndisc_router_process_default()
353 r = route_new(&route); in ndisc_router_process_default()
357 route->family = AF_INET6; in ndisc_router_process_default()
358 route->pref = preference; in ndisc_router_process_default()
359 route->gw_family = AF_INET6; in ndisc_router_process_default()
360 route->gw.in6 = gateway; in ndisc_router_process_default()
361 route->lifetime_usec = lifetime_usec; in ndisc_router_process_default()
362 route->mtu = mtu; in ndisc_router_process_default()
364 r = ndisc_request_route(TAKE_PTR(route), link, rt); in ndisc_router_process_default()
371 _cleanup_(route_freep) Route *route = NULL; in ndisc_router_process_default()
379 r = route_dup(route_gw, &route); in ndisc_router_process_default()
383 route->gw.in6 = gateway; in ndisc_router_process_default()
384 if (!route->pref_set) in ndisc_router_process_default()
385 route->pref = preference; in ndisc_router_process_default()
386 route->lifetime_usec = lifetime_usec; in ndisc_router_process_default()
387 if (route->mtu == 0) in ndisc_router_process_default()
388 route->mtu = mtu; in ndisc_router_process_default()
390 r = ndisc_request_route(TAKE_PTR(route), link, rt); in ndisc_router_process_default()
493 _cleanup_(route_freep) Route *route = NULL; in ndisc_router_process_onlink_prefix()
521 r = route_new(&route); in ndisc_router_process_onlink_prefix()
525 route->family = AF_INET6; in ndisc_router_process_onlink_prefix()
526 route->flags = RTM_F_PREFIX; in ndisc_router_process_onlink_prefix()
527 route->dst_prefixlen = prefixlen; in ndisc_router_process_onlink_prefix()
528 route->lifetime_usec = usec_add(timestamp_usec, lifetime_sec * USEC_PER_SEC); in ndisc_router_process_onlink_prefix()
530 r = sd_ndisc_router_prefix_get_address(rt, &route->dst.in6); in ndisc_router_process_onlink_prefix()
534 r = ndisc_request_route(TAKE_PTR(route), link, rt); in ndisc_router_process_onlink_prefix()
592 _cleanup_(route_freep) Route *route = NULL; in ndisc_router_process_route()
659 r = route_new(&route); in ndisc_router_process_route()
663 route->family = AF_INET6; in ndisc_router_process_route()
664 route->pref = preference; in ndisc_router_process_route()
665 route->gw.in6 = gateway; in ndisc_router_process_route()
666 route->gw_family = AF_INET6; in ndisc_router_process_route()
667 route->dst.in6 = dst; in ndisc_router_process_route()
668 route->dst_prefixlen = prefixlen; in ndisc_router_process_route()
669 route->lifetime_usec = usec_add(timestamp_usec, lifetime_sec * USEC_PER_SEC); in ndisc_router_process_route()
671 r = ndisc_request_route(TAKE_PTR(route), link, rt); in ndisc_router_process_route()