<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/libnm-core-impl/tests, branch fix-eBPF</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>libnm: fix comparing "ipv[46].dns" properties</title>
<updated>2022-10-28T15:54:15+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-27T19:10:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=991a20b4b27b8a000e48b1e607f0fe6303540525'/>
<id>991a20b4b27b8a000e48b1e607f0fe6303540525</id>
<content type='text'>
nm_setting_diff() ends up calling the compare_fcn() hook. Previously,
the hook for "dns" was _nm_setting_property_compare_fcn_default()
and the hook for "dns-data" was _nm_setting_property_compare_fcn_ignore().

That's wrong. _nm_setting_property_compare_fcn_default() converts
the property to D-Bus and compares the GVariant. However, "dns" has
to_dbus_only_in_manager_process set, so it wouldn't

Fixes: 63eaf168d1b8 ('libnm: add "dns-data" replacement for "ipv[46].dns" properties on D-Bus')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nm_setting_diff() ends up calling the compare_fcn() hook. Previously,
the hook for "dns" was _nm_setting_property_compare_fcn_default()
and the hook for "dns-data" was _nm_setting_property_compare_fcn_ignore().

That's wrong. _nm_setting_property_compare_fcn_default() converts
the property to D-Bus and compares the GVariant. However, "dns" has
to_dbus_only_in_manager_process set, so it wouldn't

Fixes: 63eaf168d1b8 ('libnm: add "dns-data" replacement for "ipv[46].dns" properties on D-Bus')
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm/tests: test comparing "ipv[46].dns" properties</title>
<updated>2022-10-28T15:54:15+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-27T19:30:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6414b016a7440f9e10fc90fcb4f71dad8890cb87'/>
<id>6414b016a7440f9e10fc90fcb4f71dad8890cb87</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm/tests: use g_assert_cmpint() in ensure_diffs() test</title>
<updated>2022-10-28T15:54:14+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-27T20:10:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=64b1b2f453de0ab5fac2b781117b99f64a676a88'/>
<id>64b1b2f453de0ab5fac2b781117b99f64a676a88</id>
<content type='text'>
Just gives a better failure message. These checks fail often, when new
code gets added.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just gives a better failure message. These checks fail often, when new
code gets added.
</pre>
</div>
</content>
</entry>
<entry>
<title>dns: accept DoT SNI server name in "ipv[46].dns" settings</title>
<updated>2022-10-27T07:11:31+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-17T07:28:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6f9090538f39ad48321a17e8acbd03ae9fd0c938'/>
<id>6f9090538f39ad48321a17e8acbd03ae9fd0c938</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: fix inconsistencies and assertions of "ipv[46].dns" handing</title>
<updated>2022-10-27T07:11:28+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-17T09:04:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=053d0a0768be6c67711d5c39154e38a6545e1e8e'/>
<id>053d0a0768be6c67711d5c39154e38a6545e1e8e</id>
<content type='text'>
- nm_setting_ip_config_add_dns() and nm_setting_ip_config_remove_dns_by_value()
  used to assert that the provided input is valid. That is not
  documented and highly problematic.
  Our parsing code for keyfile, ifcfg-rh and GVariant rightly just call
  add. Likewise, nmcli. We cannot reasonably expect them to pre-validate
  the input. Why would we anyway?
  This is wrong in particular because we usually want the user to be
  able to construct invalid settings. That is often necessary, because
  whether a value is valid depends on other values. So in general, we
  can only validate when all properties are set. We have
  nm_connection_verify() for that, and asserting/validating during add
  is very wrong. Note that "add" still filters out duplicates, which
  may be an inconsistency, but well.
  Also, the user could set any bogus value via the NM_SETTING_IP_CONFIG_DNS
  property. Those should be allowed to be removed, and the same values
  should be allowed to be added via the add method.

- add() does a normalization, presumably so that the values look nice.
  Do the same normalization also when using the NM_SETTING_IP_CONFIG_DNS
  property setter.

- previously, the setter could also set unnormalized values. As
  nm_setting_ip_config_remove_dns_by_value() looked for the normalized
  value, you couldn't remove such values anymore. That is fixed now,
  by letting the property setter do the same normalization.

- don't allocate a GPtrArray unless we need it. No need for the extra
  allocation.

- in the property setter, first set the new value before destroying the
  previous GPtrArray. It might not be possible, but it's not clear to me
  whether the strv argument from the GValue is always deep-copied or
  whether it could contain strings to the DNS property itself.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- nm_setting_ip_config_add_dns() and nm_setting_ip_config_remove_dns_by_value()
  used to assert that the provided input is valid. That is not
  documented and highly problematic.
  Our parsing code for keyfile, ifcfg-rh and GVariant rightly just call
  add. Likewise, nmcli. We cannot reasonably expect them to pre-validate
  the input. Why would we anyway?
  This is wrong in particular because we usually want the user to be
  able to construct invalid settings. That is often necessary, because
  whether a value is valid depends on other values. So in general, we
  can only validate when all properties are set. We have
  nm_connection_verify() for that, and asserting/validating during add
  is very wrong. Note that "add" still filters out duplicates, which
  may be an inconsistency, but well.
  Also, the user could set any bogus value via the NM_SETTING_IP_CONFIG_DNS
  property. Those should be allowed to be removed, and the same values
  should be allowed to be added via the add method.

- add() does a normalization, presumably so that the values look nice.
  Do the same normalization also when using the NM_SETTING_IP_CONFIG_DNS
  property setter.

- previously, the setter could also set unnormalized values. As
  nm_setting_ip_config_remove_dns_by_value() looked for the normalized
  value, you couldn't remove such values anymore. That is fixed now,
  by letting the property setter do the same normalization.

- don't allocate a GPtrArray unless we need it. No need for the extra
  allocation.

- in the property setter, first set the new value before destroying the
  previous GPtrArray. It might not be possible, but it's not clear to me
  whether the strv argument from the GValue is always deep-copied or
  whether it could contain strings to the DNS property itself.
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/tests: use nmtst_inet6_from_string() instead of *nmtst_inet6_from_string_p()</title>
<updated>2022-10-26T06:24:29+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-25T18:23:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ff9f413fcc16b3524f8ae9318826b3359891954a'/>
<id>ff9f413fcc16b3524f8ae9318826b3359891954a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>platform/tests: rename nmtst_inet6_from_string() to nmtst_inet6_from_string_p()</title>
<updated>2022-10-26T06:24:28+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-25T17:33:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2786a30a7c2c31ba98b7aac49ed9a1f82217b732'/>
<id>2786a30a7c2c31ba98b7aac49ed9a1f82217b732</id>
<content type='text'>
This helper returns a pointer (to a thread local variable).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This helper returns a pointer (to a thread local variable).
</pre>
</div>
</content>
</entry>
<entry>
<title>glib-aux: extend nm_uuid_generate_from_strings() to honor NULL values</title>
<updated>2022-10-11T07:03:17+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-07T13:13:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2d8651ba91dc1fd30f08f7ebc2cb0f8bab4d958d'/>
<id>2d8651ba91dc1fd30f08f7ebc2cb0f8bab4d958d</id>
<content type='text'>
When you call

  nm_uuid_generate_from_strings_strv(uuid_type, type_arg, v1, v2);

you'd probably expect that both values are honored in some way.
However, if v1 happened to be NULL, then previously v2 would be ignored.

Extend nm_uuid_generate_from_strings() to accept also NULL values and
pass on the length. Currently, there are no users of nm_uuid_generate_from_strings(),
so nobody is affected by this change.

Also extend nm_uuid_generate_from_strings_strv() to take a length
argument. It still accepts "-1" to take the input strv as a NULL
terminated array.

If a positive length is provided to nm_uuid_generate_from_strings_strv(),
it hashes the same UUID as the respective NULL terminated array. But of
course only, if there is no NULL inside the array. If there are any
NULLs, a distinct UUID gets generated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you call

  nm_uuid_generate_from_strings_strv(uuid_type, type_arg, v1, v2);

you'd probably expect that both values are honored in some way.
However, if v1 happened to be NULL, then previously v2 would be ignored.

Extend nm_uuid_generate_from_strings() to accept also NULL values and
pass on the length. Currently, there are no users of nm_uuid_generate_from_strings(),
so nobody is affected by this change.

Also extend nm_uuid_generate_from_strings_strv() to take a length
argument. It still accepts "-1" to take the input strv as a NULL
terminated array.

If a positive length is provided to nm_uuid_generate_from_strings_strv(),
it hashes the same UUID as the respective NULL terminated array. But of
course only, if there is no NULL inside the array. If there are any
NULLs, a distinct UUID gets generated.
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: use NMRefString for nm_connection_get_path()</title>
<updated>2022-10-06T11:43:33+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-09-26T11:39:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a1ab9d9e1c8137867bae78671f449e6361377d03'/>
<id>a1ab9d9e1c8137867bae78671f449e6361377d03</id>
<content type='text'>
NMConnection is an interface, implemented by NMSimpleConnection and
NMRemoteConnection.

For the most part, an NMConnection is only the content of the profile
(the settings). The "path" of the connection refers to the D-Bus path,
and wouldn't really make sense of the NMConnection interface or the
NMSimpleConnection type.

As such, the daemon (which only uses NMConnection and
NMSimpleConnection) never sets the path. Only libnm does.

NMClient uses NMRefString extensively for the D-Bus interface and the
path is already internalized. Take advantage of that. It is very likely,
that we are able to share the path instance in libnm at which point it
makes sense to use NMRefString.

Also, during nm_simple_connection_new_clone(), we can just take another
reference instead of cloning the string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NMConnection is an interface, implemented by NMSimpleConnection and
NMRemoteConnection.

For the most part, an NMConnection is only the content of the profile
(the settings). The "path" of the connection refers to the D-Bus path,
and wouldn't really make sense of the NMConnection interface or the
NMSimpleConnection type.

As such, the daemon (which only uses NMConnection and
NMSimpleConnection) never sets the path. Only libnm does.

NMClient uses NMRefString extensively for the D-Bus interface and the
path is already internalized. Take advantage of that. It is very likely,
that we are able to share the path instance in libnm at which point it
makes sense to use NMRefString.

Also, during nm_simple_connection_new_clone(), we can just take another
reference instead of cloning the string.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: drop nm_uuid_generate_from_strings_v3()</title>
<updated>2022-10-03T15:57:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-09-28T10:37:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e9a33bbbf87d4f01b883949bf5e2434117b0ca73'/>
<id>e9a33bbbf87d4f01b883949bf5e2434117b0ca73</id>
<content type='text'>
For new uses of nm_uuid_generate_from_strings() we should generate version5
UUIDs and we should use unique namespace UUID arguments.

The namespace UUID was so far replaced by always passing a special prefix
as first string. It seems nicer to use a namespace instead.

Version3 UUIDs should not be used for new applications.

Hence, nm_uuid_generate_from_strings_v3() is no longer a desirable way to
generate UUIDs, so drop the wrapper.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For new uses of nm_uuid_generate_from_strings() we should generate version5
UUIDs and we should use unique namespace UUID arguments.

The namespace UUID was so far replaced by always passing a special prefix
as first string. It seems nicer to use a namespace instead.

Version3 UUIDs should not be used for new applications.

Hence, nm_uuid_generate_from_strings_v3() is no longer a desirable way to
generate UUIDs, so drop the wrapper.
</pre>
</div>
</content>
</entry>
</feed>
