Lines Matching refs:gateways
370 _cleanup_free_ struct local_address *list = NULL, *gateways = NULL; in local_outbounds() local
382 n_gateways = local_gateways(context, ifindex, af, &gateways); in local_outbounds()
398 fd = socket(gateways[i].family, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); in local_outbounds()
402 switch (gateways[i].family) { in local_outbounds()
407 .sin_addr = gateways[i].address.in, in local_outbounds()
417 .sin6_addr = gateways[i].address.in6, in local_outbounds()
419 .sin6_scope_id = gateways[i].ifindex, in local_outbounds()
433 r = socket_set_unicast_if(fd, gateways[i].family, gateways[i].ifindex); in local_outbounds()
435 … log_debug_errno(r, "Failed to set unicast interface index %i, ignoring: %m", gateways[i].ifindex); in local_outbounds()
442 r = socket_bind_to_ifindex(fd, gateways[i].ifindex); in local_outbounds()
444 … log_debug_errno(r, "Failed to bind socket to interface %i, ignoring: %m", gateways[i].ifindex); in local_outbounds()
461 assert(sa.sa.sa_family == gateways[i].family); in local_outbounds()
464 switch (gateways[i].family) { in local_outbounds()
474 .family = gateways[i].family, in local_outbounds()
475 .ifindex = gateways[i].ifindex, in local_outbounds()
489 .family = gateways[i].family, in local_outbounds()
490 .ifindex = gateways[i].ifindex, in local_outbounds()