Lines Matching refs:network

32 void network_adjust_dhcp4(Network *network) {  in network_adjust_dhcp4()  argument
33 assert(network); in network_adjust_dhcp4()
35 if (!FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4)) in network_adjust_dhcp4()
38 if (network->dhcp_use_gateway < 0) in network_adjust_dhcp4()
39 network->dhcp_use_gateway = network->dhcp_use_routes; in network_adjust_dhcp4()
45 if (network->dhcp_anonymize && in network_adjust_dhcp4()
46 network->dhcp_client_identifier >= 0 && in network_adjust_dhcp4()
47 network->dhcp_client_identifier != DHCP_CLIENT_ID_MAC) { in network_adjust_dhcp4()
49 network->filename); in network_adjust_dhcp4()
50 network->dhcp_client_identifier = DHCP_CLIENT_ID_MAC; in network_adjust_dhcp4()
53 if (network->dhcp_client_identifier < 0) in network_adjust_dhcp4()
54network->dhcp_client_identifier = network->dhcp_anonymize ? DHCP_CLIENT_ID_MAC : DHCP_CLIENT_ID_DU… in network_adjust_dhcp4()
239 route->priority = link->network->dhcp_route_metric; in dhcp4_request_route()
243 route->mtu = link->network->dhcp_route_mtu; in dhcp4_request_route()
255 return !link->network->dhcp_route_table_set || in link_prefixroute()
256 link->network->dhcp_route_table == RT_TABLE_MAIN || in link_prefixroute()
438 if (!link->network->dhcp_use_routes) { in dhcp4_request_static_routes()
547 if (!link->network->dhcp_use_gateway) { in dhcp4_request_gateway()
588 assert(link->network); in dhcp4_request_semi_static_routes()
594 HASHMAP_FOREACH(rt, link->network->routes_by_section) { in dhcp4_request_semi_static_routes()
631 assert(link->network); in dhcp4_request_routes_to_servers()
662 assert(link->network); in dhcp4_request_routes_to_dns()
665 if (!link->network->dhcp_use_dns || in dhcp4_request_routes_to_dns()
666 !link->network->dhcp_routes_to_dns) in dhcp4_request_routes_to_dns()
684 assert(link->network); in dhcp4_request_routes_to_ntp()
687 if (!link->network->dhcp_use_ntp || in dhcp4_request_routes_to_ntp()
688 !link->network->dhcp_routes_to_ntp) in dhcp4_request_routes_to_ntp()
742 if (!link->network->dhcp_use_mtu) in dhcp_reset_mtu()
758 if (!link->network->dhcp_use_hostname) in dhcp_reset_hostname()
761 hostname = link->network->dhcp_hostname; in dhcp_reset_hostname()
781 assert(link->network); in dhcp4_lease_lost()
787 if (link->network->dhcp_use_6rd && in dhcp4_lease_lost()
842 assert(link->network); in dhcp4_request_address()
857 if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { in dhcp4_request_address()
912 addr->route_metric = link->network->dhcp_route_metric; in dhcp4_request_address()
913 …addr->duplicate_address_detection = link->network->dhcp_send_decline ? ADDRESS_FAMILY_IPV4 : ADDRE… in dhcp4_request_address()
915 r = free_and_strdup_warn(&addr->label, link->network->dhcp_label); in dhcp4_request_address()
962 assert(link->network); in dhcp_lease_renew()
973 if (link->network->dhcp_use_6rd) { in dhcp_lease_renew()
1000 if (link->network->dhcp_use_mtu) { in dhcp_lease_acquired()
1011 if (link->network->dhcp_use_hostname) { in dhcp_lease_acquired()
1015 if (link->network->dhcp_hostname) in dhcp_lease_acquired()
1016 dhcpname = link->network->dhcp_hostname; in dhcp_lease_acquired()
1035 if (link->network->dhcp_use_timezone) { in dhcp_lease_acquired()
1047 if (link->network->dhcp_use_6rd && in dhcp_lease_acquired()
1073 assert(link->network); in dhcp_server_is_filtered()
1084 …if (in4_address_is_filtered(&addr, link->network->dhcp_allow_listed_ip, link->network->dhcp_deny_l… in dhcp_server_is_filtered()
1086 if (link->network->dhcp_allow_listed_ip) in dhcp_server_is_filtered()
1105 assert(link->network); in dhcp4_handler()
1121 if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { in dhcp4_handler()
1127 if (link->network->dhcp_send_release) { in dhcp4_handler()
1144 if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { in dhcp4_handler()
1159 if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) { in dhcp4_handler()
1223 if (!link->network->dhcp_send_hostname) in dhcp4_set_hostname()
1225 else if (link->network->dhcp_hostname) in dhcp4_set_hostname()
1226 hn = link->network->dhcp_hostname; in dhcp4_set_hostname()
1249 assert(link->network); in dhcp4_set_client_identifier()
1252 switch (link->network->dhcp_client_identifier) { in dhcp4_set_client_identifier()
1259 link->network->dhcp_iaid_set, in dhcp4_set_client_identifier()
1260 link->network->dhcp_iaid, in dhcp4_set_client_identifier()
1264 link->network->dhcp_iaid_set, in dhcp4_set_client_identifier()
1265 link->network->dhcp_iaid, in dhcp4_set_client_identifier()
1318 assert(link->network); in dhcp4_set_request_address()
1321 if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) in dhcp4_set_request_address()
1346 assert(link->network); in link_needs_dhcp_broadcast()
1353 r = link->network->dhcp_broadcast; in link_needs_dhcp_broadcast()
1371 assert(link->network); in dhcp4_configure()
1376 r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize); in dhcp4_configure()
1409 if (!link->network->dhcp_anonymize) { in dhcp4_configure()
1410 if (link->network->dhcp_use_mtu) { in dhcp4_configure()
1416 if (link->network->dhcp_use_routes) { in dhcp4_configure()
1426 if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO) { in dhcp4_configure()
1432 if (link->network->dhcp_use_ntp) { in dhcp4_configure()
1438 if (link->network->dhcp_use_sip) { in dhcp4_configure()
1444 if (link->network->dhcp_use_timezone) { in dhcp4_configure()
1450 if (link->network->dhcp_use_6rd) { in dhcp4_configure()
1456 SET_FOREACH(request_options, link->network->dhcp_request_options) { in dhcp4_configure()
1464 ORDERED_HASHMAP_FOREACH(send_option, link->network->dhcp_client_send_options) { in dhcp4_configure()
1472 … ORDERED_HASHMAP_FOREACH(send_option, link->network->dhcp_client_send_vendor_options) { in dhcp4_configure()
1484 if (link->network->dhcp_vendor_class_identifier) { in dhcp4_configure()
1486 … link->network->dhcp_vendor_class_identifier); in dhcp4_configure()
1491 if (link->network->dhcp_mudurl) { in dhcp4_configure()
1492 … r = sd_dhcp_client_set_mud_url(link->dhcp_client, link->network->dhcp_mudurl); in dhcp4_configure()
1497 if (link->network->dhcp_user_class) { in dhcp4_configure()
1498 … r = sd_dhcp_client_set_user_class(link->dhcp_client, link->network->dhcp_user_class); in dhcp4_configure()
1504 if (link->network->dhcp_client_port > 0) { in dhcp4_configure()
1505 … r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port); in dhcp4_configure()
1510 if (link->network->dhcp_max_attempts > 0) { in dhcp4_configure()
1511 … r = sd_dhcp_client_set_max_attempts(link->dhcp_client, link->network->dhcp_max_attempts); in dhcp4_configure()
1516 if (link->network->dhcp_ip_service_type >= 0) { in dhcp4_configure()
1517 … r = sd_dhcp_client_set_service_type(link->dhcp_client, link->network->dhcp_ip_service_type); in dhcp4_configure()
1522 if (link->network->dhcp_fallback_lease_lifetime > 0) { in dhcp4_configure()
1523 …r = sd_dhcp_client_set_fallback_lease_lifetime(link->dhcp_client, link->network->dhcp_fallback_lea… in dhcp4_configure()
1576 … if (!IN_SET(link->network->dhcp_client_identifier, DHCP_CLIENT_ID_DUID, DHCP_CLIENT_ID_DUID_ONLY)) in dhcp4_configure_duid()
1643 Network *network = data; in config_parse_dhcp_max_attempts() local
1647 assert(network); in config_parse_dhcp_max_attempts()
1652 network->dhcp_max_attempts = 0; in config_parse_dhcp_max_attempts()
1657 network->dhcp_max_attempts = UINT64_MAX; in config_parse_dhcp_max_attempts()
1674 network->dhcp_max_attempts = a; in config_parse_dhcp_max_attempts()
1725 Network *network = userdata; in config_parse_dhcp_fallback_lease_lifetime() local
1734 network->dhcp_fallback_lease_lifetime = 0; in config_parse_dhcp_fallback_lease_lifetime()
1745 network->dhcp_fallback_lease_lifetime = UINT32_MAX; in config_parse_dhcp_fallback_lease_lifetime()