mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 21:50:17 +01:00
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:
parent
6897b6ecfd
commit
5fa063f90d
2 changed files with 19 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue