diff options
| author | Michael Biebl <biebl@debian.org> | 2024-05-05 00:07:42 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-05-05 00:07:42 +0200 |
| commit | a9c892f6640668b93848584d246280c4d33cc025 (patch) | |
| tree | 914226b8c8fffd1a8e101e71d361d6d126322c12 /src/libnm-core-impl/nm-setting-ip-config.c | |
| parent | f03946fe0cdd73041658be1009f06f0e287c4b80 (diff) | |
| parent | 34bb501be08aa2b313d88e67d6e0a7e0a3f9cfa6 (diff) | |
Update upstream source from tag 'upstream/1.47.90'
Update to upstream version '1.47.90' with Debian dir fca683c43690f5e2bfc191d3d528666444bec54b
Diffstat (limited to 'src/libnm-core-impl/nm-setting-ip-config.c')
| -rw-r--r-- | src/libnm-core-impl/nm-setting-ip-config.c | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/src/libnm-core-impl/nm-setting-ip-config.c b/src/libnm-core-impl/nm-setting-ip-config.c index 02334b54..e79f25a8 100644 --- a/src/libnm-core-impl/nm-setting-ip-config.c +++ b/src/libnm-core-impl/nm-setting-ip-config.c @@ -4004,7 +4004,8 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMSettingIPConfig, PROP_DHCP_IAID, PROP_DHCP_REJECT_SERVERS, PROP_AUTO_ROUTE_EXT_GW, - PROP_REPLACE_LOCAL_RULE, ); + PROP_REPLACE_LOCAL_RULE, + PROP_DHCP_SEND_RELEASE, ); G_DEFINE_ABSTRACT_TYPE(NMSettingIPConfig, nm_setting_ip_config, NM_TYPE_SETTING) @@ -5463,6 +5464,22 @@ nm_setting_ip_config_get_replace_local_rule(NMSettingIPConfig *setting) return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->replace_local_rule; } +/** + * nm_setting_ip_config_get_dhcp_send_release: + * @setting: the #NMSettingIPConfig + * + * Returns: the #NMSettingIPConfig:dhcp-send-release property of the setting + * + * Since: 1.48 + **/ +NMTernary +nm_setting_ip_config_get_dhcp_send_release(NMSettingIPConfig *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_IP_CONFIG(setting), NM_TERNARY_DEFAULT); + + return NM_SETTING_IP_CONFIG_GET_PRIVATE(setting)->dhcp_send_release; +} + static gboolean verify_label(const char *label) { @@ -6152,6 +6169,14 @@ _nm_sett_info_property_override_create_array_ip_config(int addr_family) _nm_properties_override_gobj( properties_override, + obj_properties[PROP_DHCP_SEND_RELEASE], + &nm_sett_info_propert_type_direct_enum, + .direct_offset = + NM_STRUCT_OFFSET_ENSURE_TYPE(int, NMSettingIPConfigPrivate, dhcp_send_release), + .direct_data.enum_gtype = NM_TYPE_TERNARY); + + _nm_properties_override_gobj( + properties_override, obj_properties[PROP_DNS_SEARCH], &nm_sett_info_propert_type_direct_strv, .direct_offset = @@ -6903,5 +6928,23 @@ nm_setting_ip_config_class_init(NMSettingIPConfigClass *klass) NM_TERNARY_DEFAULT, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + /** + * NMSettingIPConfig:dhcp-send-release: + * + * Whether the DHCP client will send RELEASE message when + * bringing the connection down. The default value is %NM_TERNARY_DEFAULT. + * When the default value is specified, then the global value from NetworkManager + * configuration is looked up, if not set, it is considered as %FALSE. + * + * Since: 1.48 + */ + obj_properties[PROP_DHCP_SEND_RELEASE] = + g_param_spec_enum(NM_SETTING_IP_CONFIG_DHCP_SEND_RELEASE, + "", + "", + NM_TYPE_TERNARY, + NM_TERNARY_DEFAULT, + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties); } |