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.
(cherry picked from commit a3ce13c947
)
This commit is contained in:
@@ -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
|
NMProxyConfigMethod
|
||||||
nm_l3_config_data_get_proxy_method(const NML3ConfigData *self)
|
nm_l3_config_data_get_proxy_method(const NML3ConfigData *self)
|
||||||
{
|
{
|
||||||
|
@@ -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,
|
gboolean nm_l3_config_data_get_allow_routes_without_address(const NML3ConfigData *self,
|
||||||
int addr_family);
|
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);
|
NMProxyConfigMethod nm_l3_config_data_get_proxy_method(const NML3ConfigData *self);
|
||||||
|
|
||||||
gboolean nm_l3_config_data_set_proxy_method(NML3ConfigData *self, NMProxyConfigMethod value);
|
gboolean nm_l3_config_data_set_proxy_method(NML3ConfigData *self, NMProxyConfigMethod value);
|
||||||
|
Reference in New Issue
Block a user