diff options
author | Francesco Giudici <fgiudici@redhat.com> | 2019-07-30 14:37:38 +0200 |
---|---|---|
committer | Francesco Giudici <fgiudici@redhat.com> | 2019-09-13 18:44:32 +0200 |
commit | 3a10c477864ed4d07d0e4c67537b67add52926f0 (patch) | |
tree | 95fce42c350da4ceb50b2567bf159c8165d95078 | |
parent | 6945ecb80423eb6c1eb4cc4e0408ce2b0356e9a0 (diff) | |
download | NetworkManager-3a10c477864ed4d07d0e4c67537b67add52926f0.tar.gz |
dhcp: nettools: drop the 'iface' parameter when no more used
Drop it from the functions for extracting the dhcp options from the
lease: it was just used for the logging, but now we log all the options
once, at the end of the process.
-rw-r--r-- | src/dhcp/nm-dhcp-nettools.c | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index 8d1ca13678..594145a84d 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -343,7 +343,6 @@ lease_get_u16 (NDhcp4ClientLease *lease, static gboolean lease_parse_address (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options, GError **error) @@ -432,7 +431,6 @@ lease_parse_address (NDhcp4ClientLease *lease, static void lease_parse_domain_name_servers (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options) { @@ -471,7 +469,6 @@ lease_parse_domain_name_servers (NDhcp4ClientLease *lease, static void lease_parse_routes (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options, guint32 route_table, @@ -630,7 +627,6 @@ lease_parse_routes (NDhcp4ClientLease *lease, static void lease_parse_mtu (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options) { @@ -651,7 +647,6 @@ lease_parse_mtu (NDhcp4ClientLease *lease, static void lease_parse_metered (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options) { @@ -673,7 +668,6 @@ lease_parse_metered (NDhcp4ClientLease *lease, static void lease_parse_ntps (NDhcp4ClientLease *lease, - const char *iface, GHashTable *options) { nm_auto_free_gstring GString *str = NULL; @@ -702,7 +696,6 @@ lease_parse_ntps (NDhcp4ClientLease *lease, static void lease_parse_hostname (NDhcp4ClientLease *lease, - const char *iface, GHashTable *options) { nm_auto_free_gstring GString *str = NULL; @@ -727,7 +720,6 @@ lease_parse_hostname (NDhcp4ClientLease *lease, static void lease_parse_domainname (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options) { @@ -762,7 +754,6 @@ lease_parse_domainname (NDhcp4ClientLease *lease, static void lease_parse_search_domains (NDhcp4ClientLease *lease, - const char *iface, NMIP4Config *ip4_config, GHashTable *options) { @@ -798,7 +789,6 @@ lease_parse_search_domains (NDhcp4ClientLease *lease, static void lease_parse_root_path (NDhcp4ClientLease *lease, - const char *iface, GHashTable *options) { nm_auto_free_gstring GString *str = NULL; @@ -819,7 +809,6 @@ lease_parse_root_path (NDhcp4ClientLease *lease, static void lease_parse_wpad (NDhcp4ClientLease *lease, - const char *iface, GHashTable *options) { nm_auto_free_gstring GString *str = NULL; @@ -840,7 +829,6 @@ lease_parse_wpad (NDhcp4ClientLease *lease, static void lease_parse_private_options (NDhcp4ClientLease *lease, - const char *iface, GHashTable *options) { int i; @@ -890,21 +878,21 @@ lease_to_ip4_config (NMDedupMultiIndex *multi_idx, ip4_config = nm_ip4_config_new (multi_idx, ifindex); options = out_options ? nm_dhcp_option_create_options_dict () : NULL; - if (!lease_parse_address (lease, iface, ip4_config, options, error)) + if (!lease_parse_address (lease, ip4_config, options, error)) return NULL; - lease_parse_routes (lease, iface, ip4_config, options, route_table, route_metric); - lease_parse_domain_name_servers (lease, iface, ip4_config, options); - lease_parse_domainname (lease, iface, ip4_config, options); - lease_parse_search_domains (lease, iface, ip4_config, options); - lease_parse_mtu (lease, iface, ip4_config, options); - lease_parse_metered (lease, iface, ip4_config, options); - - lease_parse_hostname (lease, iface, options); - lease_parse_ntps (lease, iface, options); - lease_parse_root_path (lease, iface, options); - lease_parse_wpad (lease, iface, options); - lease_parse_private_options (lease, iface, options); + lease_parse_routes (lease, ip4_config, options, route_table, route_metric); + lease_parse_domain_name_servers (lease, ip4_config, options); + lease_parse_domainname (lease, ip4_config, options); + lease_parse_search_domains (lease, ip4_config, options); + lease_parse_mtu (lease, ip4_config, options); + lease_parse_metered (lease, ip4_config, options); + + lease_parse_hostname (lease, options); + lease_parse_ntps (lease, options); + lease_parse_root_path (lease, options); + lease_parse_wpad (lease, options); + lease_parse_private_options (lease, options); NM_SET_OUT (out_options, g_steal_pointer (&options)); return g_steal_pointer (&ip4_config); |