core: add nm_l3_config_data_set_allow_routes_without_address()

Add a function to set the allow-routes-without-address flag for
l3cds. It will be used in the next commit.
This commit is contained in:
Beniamino Galvani 2024-05-08 11:02:20 +02:00
parent b31febea22
commit a3ce13c947
2 changed files with 19 additions and 0 deletions

View file

@ -1950,6 +1950,21 @@ nm_l3_config_data_get_allow_routes_without_address(const NML3ConfigData *self, i
}
}
void
nm_l3_config_data_set_allow_routes_without_address(NML3ConfigData *self,
int addr_family,
gboolean value)
{
const int IS_IPv4 = NM_IS_IPv4(addr_family);
nm_assert(_NM_IS_L3_CONFIG_DATA(self, FALSE));
if (IS_IPv4) {
self->allow_routes_without_address_4 = value;
} else {
self->allow_routes_without_address_6 = value;
}
}
NMProxyConfigMethod
nm_l3_config_data_get_proxy_method(const NML3ConfigData *self)
{

View file

@ -557,6 +557,10 @@ gboolean nm_l3_config_data_set_ip6_privacy(NML3ConfigData *self,
gboolean nm_l3_config_data_get_allow_routes_without_address(const NML3ConfigData *self,
int addr_family);
void nm_l3_config_data_set_allow_routes_without_address(NML3ConfigData *self,
int addr_family,
gboolean value);
NMProxyConfigMethod nm_l3_config_data_get_proxy_method(const NML3ConfigData *self);
gboolean nm_l3_config_data_set_proxy_method(NML3ConfigData *self, NMProxyConfigMethod value);