<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/nm-core-utils.h, branch th/strsplit</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>policy: treat WireGuard devices as VPN for DNS</title>
<updated>2019-02-14T07:00:29+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-02-09T10:46:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6f35efe6fe380a1f0c18638217e747ae836a7505'/>
<id>6f35efe6fe380a1f0c18638217e747ae836a7505</id>
<content type='text'>
WireGuard devices are (will be) regular NMDevice implementations,
but NMDnsManager should treat them like VPN.

For that, reuse the device's type and nm_device_get_route_metric_default().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WireGuard devices are (will be) regular NMDevice implementations,
but NMDnsManager should treat them like VPN.

For that, reuse the device's type and nm_device_get_route_metric_default().
</pre>
</div>
</content>
</entry>
<entry>
<title>dhcp: move nm_utils_dhcp_client_id_mac() to "nm-core-utils.c"</title>
<updated>2019-01-07T16:05:17+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-20T07:38:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2ef9a089eb430536a3ebd0fce784dbfbac061b80'/>
<id>2ef9a089eb430536a3ebd0fce784dbfbac061b80</id>
<content type='text'>
We will need it outside of "src/devices/nm-device.c".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We will need it outside of "src/devices/nm-device.c".
</pre>
</div>
</content>
</entry>
<entry>
<title>core/trivial: rename nm_utils_detect_arp_type_from_addrlen() to nm_utils_arp_type_detect_from_hwaddrlen()</title>
<updated>2019-01-07T16:05:17+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-20T07:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3bce451c60ac808dca1bf94de5a11c462934e8df'/>
<id>3bce451c60ac808dca1bf94de5a11c462934e8df</id>
<content type='text'>
Rename the function so that the function name's prefix is
the topic what this is about: arp-type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the function so that the function name's prefix is
the topic what this is about: arp-type.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add nm_utils_detect_arp_type_from_addrlen() helper</title>
<updated>2018-12-14T08:53:47+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-14T07:45:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6e48e99be4fe11e9bf1e2c2a20b1caadb63377d3'/>
<id>6e48e99be4fe11e9bf1e2c2a20b1caadb63377d3</id>
<content type='text'>
and use it in "nm-dhcp-systemd.c".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and use it in "nm-dhcp-systemd.c".
</pre>
</div>
</content>
</entry>
<entry>
<title>core: use addr-family argument for nm_utils_get_ip_config_method()</title>
<updated>2018-12-13T08:16:32+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-12T16:11:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=589063db3b08a5899eae1e6c84eb68bd309d2736'/>
<id>589063db3b08a5899eae1e6c84eb68bd309d2736</id>
<content type='text'>
Recently, more and more code was refactored to use an addr_family
integer to distinguish between IPv4 and IPv6.

Refactor nm_utils_get_ip_config_method() and nm_device_get_effective_ip_config_method()
to do that too. If we use different identifiers, we need to translate from one to
another and its inconsistent. Also, accessing a GType is an unnecessary function call,
instead of a plain constant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recently, more and more code was refactored to use an addr_family
integer to distinguish between IPv4 and IPv6.

Refactor nm_utils_get_ip_config_method() and nm_device_get_effective_ip_config_method()
to do that too. If we use different identifiers, we need to translate from one to
another and its inconsistent. Also, accessing a GType is an unnecessary function call,
instead of a plain constant.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: never fail reading host-id timestamp and never change it</title>
<updated>2018-12-12T13:03:35+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-12T10:04:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a68d027ba4537a6e30272e39a9f7927bcdca0eee'/>
<id>a68d027ba4537a6e30272e39a9f7927bcdca0eee</id>
<content type='text'>
The timestamp of the host-id is the timestamp of the secret_key file.
Under normal circumstances, reading the timestamp should never fail,
and reading it multiple times should always yield the same result.

If we unexpectedly fail to read the timestamp from the file we want:

- log a warning, so that the user can find out what's wrong. But
  do so only once.

- we don't want to handle errors or fail operation due to a missing
  timestamp. Remember, it's not supposed to ever fail, and if it does,
  just log a warning and proceed with a fake timestamp instead. In
  that case something is wrong, but using a non-stable, fake timestamp
  is the least of the problems here.
  We already have a stable identifier (the host-id) which we can use to
  generate a fake timestamp. Use it.

In case the user would replace the secret_key file, we also don't want
that accessing nm_utils_host_id_get_timestamp*() yields different
results. It's not implemented (nor necessary) to support reloading a
different timestamp. Hence, nm_utils_host_id_get_timestamp() should
memoize the value and ensure that it never changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The timestamp of the host-id is the timestamp of the secret_key file.
Under normal circumstances, reading the timestamp should never fail,
and reading it multiple times should always yield the same result.

If we unexpectedly fail to read the timestamp from the file we want:

- log a warning, so that the user can find out what's wrong. But
  do so only once.

- we don't want to handle errors or fail operation due to a missing
  timestamp. Remember, it's not supposed to ever fail, and if it does,
  just log a warning and proceed with a fake timestamp instead. In
  that case something is wrong, but using a non-stable, fake timestamp
  is the least of the problems here.
  We already have a stable identifier (the host-id) which we can use to
  generate a fake timestamp. Use it.

In case the user would replace the secret_key file, we also don't want
that accessing nm_utils_host_id_get_timestamp*() yields different
results. It's not implemented (nor necessary) to support reloading a
different timestamp. Hence, nm_utils_host_id_get_timestamp() should
memoize the value and ensure that it never changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>core/trivial: rename nm_utils_get_boot_id_*()</title>
<updated>2018-12-12T11:52:55+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-12T09:14:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d693e03a74bee600ba14ee8dad666ff6fe658ca2'/>
<id>d693e03a74bee600ba14ee8dad666ff6fe658ca2</id>
<content type='text'>
Rename to nm_utils_boot_id_*(), it matches nm_utils_machine_id_*()
and nm_utils_host_id_get().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename to nm_utils_boot_id_*(), it matches nm_utils_machine_id_*()
and nm_utils_host_id_get().
</pre>
</div>
</content>
</entry>
<entry>
<title>core/trivial: rename secret-key to host-key</title>
<updated>2018-12-12T11:52:55+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-12T09:10:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6ffcd263177d01a528a89709609f06550ecded9b'/>
<id>6ffcd263177d01a528a89709609f06550ecded9b</id>
<content type='text'>
Now that the secret-key is hashed with the machine-id, the name is
no longer best.

Sure, part of the key are persisted in /var/lib/NetworkManager/secret_key
file, which the user is well advised to keep secret.

But what nm_utils_secret_key_get() returns is first and foremost a binary
key that is per-host and used for hashing a per-host component. It's
really the "host-id". Compare that to what we also have, the
"machine-id" and the "boot-id".

Rename.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the secret-key is hashed with the machine-id, the name is
no longer best.

Sure, part of the key are persisted in /var/lib/NetworkManager/secret_key
file, which the user is well advised to keep secret.

But what nm_utils_secret_key_get() returns is first and foremost a binary
key that is per-host and used for hashing a per-host component. It's
really the "host-id". Compare that to what we also have, the
"machine-id" and the "boot-id".

Rename.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add nm_utils_create_dhcp_iaid() util</title>
<updated>2018-11-29T06:48:20+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-11-23T12:00:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0ae18f06804b9c67aebd3970856273e8d8cc9bf0'/>
<id>0ae18f06804b9c67aebd3970856273e8d8cc9bf0</id>
<content type='text'>
Split out nm_utils_create_dhcp_iaid(), we will need it later.
This is also a re-implementation of systemd's dhcp_identifier_set_iaid().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split out nm_utils_create_dhcp_iaid(), we will need it later.
This is also a re-implementation of systemd's dhcp_identifier_set_iaid().
</pre>
</div>
</content>
</entry>
<entry>
<title>all: add "${MAC}" substituion for "connection.stable-id"</title>
<updated>2018-11-13T18:09:34+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-11-02T11:07:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7ffbf7127603a935236785f6a59a104583194df4'/>
<id>7ffbf7127603a935236785f6a59a104583194df4</id>
<content type='text'>
We already had "${DEVICE}" which uses the interface name.
In times of predictable interface naming, that works well.
It allows the user to generate IDs per device which don't
change when the hardware is replaced.

"${MAC}" is similar, except that is uses the permanent MAC
address of the device. The substitution results in the empty
word, if the device has no permanent MAC address (like software
devices).

The per-device substitutions "${DEVICE}" and "${MAC}" are especially
interesting with "connection.multi-connect=multiple".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We already had "${DEVICE}" which uses the interface name.
In times of predictable interface naming, that works well.
It allows the user to generate IDs per device which don't
change when the hardware is replaced.

"${MAC}" is similar, except that is uses the permanent MAC
address of the device. The substitution results in the empty
word, if the device has no permanent MAC address (like software
devices).

The per-device substitutions "${DEVICE}" and "${MAC}" are especially
interesting with "connection.multi-connect=multiple".
</pre>
</div>
</content>
</entry>
</feed>
