<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/libnm-core-impl, 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: generate "gen-metadata-nm-settings-libnm-core.xml" with meta data</title>
<updated>2022-10-31T08:11:30+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-26T08:24:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d699f76855d2957c6f33a0e401b881c39540adb6'/>
<id>d699f76855d2957c6f33a0e401b881c39540adb6</id>
<content type='text'>
libnm-core-impl has lots of internal meta data about the properties.
In particular, which properties exist (their names), and their D-Bus
type.

We should use this information for our manual pages. For example,
currently `man nm-settings-dbus` has nonsense like: "Value Type: array
of string", when it should be reall "as".

In a first step, generate an XML with that meta data for later use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libnm-core-impl has lots of internal meta data about the properties.
In particular, which properties exist (their names), and their D-Bus
type.

We should use this information for our manual pages. For example,
currently `man nm-settings-dbus` has nonsense like: "Value Type: array
of string", when it should be reall "as".

In a first step, generate an XML with that meta data for later use.
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: minor refactoring on property_to_dbus() and add comment</title>
<updated>2022-10-28T15:54:16+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-27T19:57:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e72b1f49b3f69e1b5160148a747a2d9f9cded269'/>
<id>e72b1f49b3f69e1b5160148a747a2d9f9cded269</id>
<content type='text'>
Add a comment. Also, restructure the check so that it is (hopefully)
easier to read.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a comment. Also, restructure the check so that it is (hopefully)
easier to read.
</pre>
</div>
</content>
</entry>
<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: fix _nm_setting_property_compare_fcn_default() for "to_dbus_only_in_manager_process"</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:43:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0f0468b208b8e1c45d57be9b1d0b1bd2d27d5d51'/>
<id>0f0468b208b8e1c45d57be9b1d0b1bd2d27d5d51</id>
<content type='text'>
property_to_dbus() gets called for two reasons. Once from
_nm_setting_to_dbus(). In that case, we want to honor
to_dbus_only_in_manager_process().

It gets also called from _nm_setting_property_compare_fcn_default(),
with ignore_flags set. In that case, we don't want to ignore the property
as the hook really wants to compare them.

Fixes: c8392018ca19 ('libnm: refactor to-dbus on the client skipping to serialize legacy properties')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
property_to_dbus() gets called for two reasons. Once from
_nm_setting_to_dbus(). In that case, we want to honor
to_dbus_only_in_manager_process().

It gets also called from _nm_setting_property_compare_fcn_default(),
with ignore_flags set. In that case, we don't want to ignore the property
as the hook really wants to compare them.

Fixes: c8392018ca19 ('libnm: refactor to-dbus on the client skipping to serialize legacy properties')
</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>libnm: unify IPv4/IPv6 forms of DNS to GVariant helper</title>
<updated>2022-10-27T07:11:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-24T16:36:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=bdb124852f407515661033aa20a827c9a186dc7c'/>
<id>bdb124852f407515661033aa20a827c9a186dc7c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>dns/resolved: set DoT server name (SNI) in systemd-resolved</title>
<updated>2022-10-27T07:11:38+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-10-17T19:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d5be1c706ed4f0943b6cf36d142e28e1c0216f6c'/>
<id>d5be1c706ed4f0943b6cf36d142e28e1c0216f6c</id>
<content type='text'>
Unfortunately, for this we require SetLinkDNSEx() API from v246.
That adds extra complexity.

If the configuration contains no server name, we continue using
SetLinkDNS(). Otherwise, at first we try using SetLinkDNSEx().
We will notice if that method is unsupported, reconfigure with
SetLinkDNS(), and set a flag to not try that again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately, for this we require SetLinkDNSEx() API from v246.
That adds extra complexity.

If the configuration contains no server name, we continue using
SetLinkDNS(). Otherwise, at first we try using SetLinkDNSEx().
We will notice if that method is unsupported, reconfigure with
SetLinkDNS(), and set a flag to not try that again.
</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>
</feed>
