core: fuzzier matching of generated connections to persistent ones
When generating a connection, if the device has no non-link-local IPv6 address, then it's unclear whether (a) the connection was link-local originally, or (b) the connection was 'auto' but IPv6 failed or timed out. In this case, if there is a persistent connection that is 'auto' but the generated connection is 'link-local', the persistent connection should be used. Add a more-testable framework for doing the connection matching to handle this.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "nm-ip6-config.h"
|
||||
#include "nm-setting-ip6-config.h"
|
||||
#include "nm-connection.h"
|
||||
#include "nm-setting-private.h"
|
||||
|
||||
gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
|
||||
|
||||
@@ -86,4 +87,11 @@ char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);
|
||||
|
||||
GPtrArray *nm_utils_read_resolv_conf_nameservers (const char *rc_contents);
|
||||
|
||||
typedef gboolean (NMUtilsMatchFilterFunc) (NMConnection *connection, gpointer user_data);
|
||||
|
||||
NMConnection *nm_utils_match_connection (GSList *connections,
|
||||
NMConnection *original,
|
||||
NMUtilsMatchFilterFunc match_filter_func,
|
||||
gpointer match_filter_data);
|
||||
|
||||
#endif /* NETWORK_MANAGER_UTILS_H */
|
||||
|
Reference in New Issue
Block a user