<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git, branch th/static-default-route</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>all: allow configuring default-routes as manual, static routes</title>
<updated>2019-08-10T08:24:05+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-03T06:15:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=903123d645529e0997b0ab4b516161b426ccebd2'/>
<id>903123d645529e0997b0ab4b516161b426ccebd2</id>
<content type='text'>
Up until now, a default-route (with prefix length zero) could not
be configured directly. The user could only set ipv4.gateway,
ipv4.never-default, ipv4.route-metric and ipv4.route-table to influence
the setting of the default-route (respectively for IPv6).

That is a problematic limitation. For one, whether a route has prefix
length zero or non-zero does not make a fundamental difference. Also,
it makes it impossible to configure all the routing attributes that one can
configure otherwise for static routes. For example, the default-route could
not be configured as "onlink", could not have a special MTU, nor could it be
placed in a dedicated routing table.

Fix that by lifting the restriction. Note that "ipv4.never-default" does
not apply to /0 manual routes. Likewise, the previous manners of
configuring default-routes ("ipv4.gateway") don't conflict with manual
default-routes.

Server-side this all the pieces are already in place to accept a default-route
as static routes. This was done by earlier commits like 5c299454b49b
('core: rework tracking of gateway/default-route in ip-config').

A long time ago, NMIPRoute would assert that the prefix length is
positive. That was relaxed by commit a2e93f2de4ac ('libnm: allow zero
prefix length for NMIPRoute'), already before 1.0.0. Using libnm from
before 1.0.0 would result in assertion failures.

Note that the default-route-metric-penalty based on connectivity
checking applies to all /0 routes, even these static routes. Be they
added due to DHCP, "ipv4.gateway", "ipv4.routes" or "wireguard.peer-routes".
I wonder whether doing that unconditionally is desirable, and maybe
there should be a way to opt-out/opt-in for the entire profile or even
per-routes.

https://bugzilla.redhat.com/show_bug.cgi?id=1714438
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Up until now, a default-route (with prefix length zero) could not
be configured directly. The user could only set ipv4.gateway,
ipv4.never-default, ipv4.route-metric and ipv4.route-table to influence
the setting of the default-route (respectively for IPv6).

That is a problematic limitation. For one, whether a route has prefix
length zero or non-zero does not make a fundamental difference. Also,
it makes it impossible to configure all the routing attributes that one can
configure otherwise for static routes. For example, the default-route could
not be configured as "onlink", could not have a special MTU, nor could it be
placed in a dedicated routing table.

Fix that by lifting the restriction. Note that "ipv4.never-default" does
not apply to /0 manual routes. Likewise, the previous manners of
configuring default-routes ("ipv4.gateway") don't conflict with manual
default-routes.

Server-side this all the pieces are already in place to accept a default-route
as static routes. This was done by earlier commits like 5c299454b49b
('core: rework tracking of gateway/default-route in ip-config').

A long time ago, NMIPRoute would assert that the prefix length is
positive. That was relaxed by commit a2e93f2de4ac ('libnm: allow zero
prefix length for NMIPRoute'), already before 1.0.0. Using libnm from
before 1.0.0 would result in assertion failures.

Note that the default-route-metric-penalty based on connectivity
checking applies to all /0 routes, even these static routes. Be they
added due to DHCP, "ipv4.gateway", "ipv4.routes" or "wireguard.peer-routes".
I wonder whether doing that unconditionally is desirable, and maybe
there should be a way to opt-out/opt-in for the entire profile or even
per-routes.

https://bugzilla.redhat.com/show_bug.cgi?id=1714438
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: avoid heap allocation for checking valid routes in nm_ip_route_attribute_validate()</title>
<updated>2019-08-10T08:24:05+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-03T06:01:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7d2de190d5e69ad498e94c372bb4de268838983e'/>
<id>7d2de190d5e69ad498e94c372bb4de268838983e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>libnm: set errno in nm_key_file_get_boolean() to distinguish between missing key and error</title>
<updated>2019-08-10T08:24:05+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-02T21:13:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8a3558c037def7fb44c1b1b2e6c9975290bff5b9'/>
<id>8a3558c037def7fb44c1b1b2e6c9975290bff5b9</id>
<content type='text'>
This is also what nm_keyfile_plugin_kf_get_int64() does. It's useful to
know whether a value was missing or invalid.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is also what nm_keyfile_plugin_kf_get_int64() does. It's useful to
know whether a value was missing or invalid.
</pre>
</div>
</content>
</entry>
<entry>
<title>NEWS: update header for future 1.22 release</title>
<updated>2019-08-10T07:43:18+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-10T07:40:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6f4b6985e8863abb11889c32fe1fc7ff8257ba18'/>
<id>6f4b6985e8863abb11889c32fe1fc7ff8257ba18</id>
<content type='text'>
Also, mark 1.20 as stable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also, mark 1.20 as stable.
</pre>
</div>
</content>
</entry>
<entry>
<title>settings: merge branch 'th/settings-improvements'</title>
<updated>2019-08-09T05:49:34+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-09T05:49:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b32292003ea09cb23093775f0dfb69eec137a2d5'/>
<id>b32292003ea09cb23093775f0dfb69eec137a2d5</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/224
</pre>
</div>
</content>
</entry>
<entry>
<title>settings: return errno from nms_keyfile_nmmeta_write() for better logging</title>
<updated>2019-08-08T10:03:15+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-01T08:52:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=4e36521d4c82b2967628def8125a83ecd13bfd8c'/>
<id>4e36521d4c82b2967628def8125a83ecd13bfd8c</id>
<content type='text'>
I encountered a failure in the log

    &lt;trace&gt; [1564647990.7822] keyfile: commit: deleting nmmeta file "/etc/NetworkManager/system-connections/35370b0b-e53b-42ea-9fe3-f1b1d552343b.nmmeta" failed
    &lt;trace&gt; [1564647990.7822] keyfile: commit: deleting nmmeta file "/etc/NetworkManager/system-connections/35370b0b-e53b-42ea-9fe3-f1b1d552343b.nmmeta" simulated

I think that was due to SELinux (rh #1738010).

Let nms_keyfile_nmmeta_write() return an errno code so we can log
more information about the failure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I encountered a failure in the log

    &lt;trace&gt; [1564647990.7822] keyfile: commit: deleting nmmeta file "/etc/NetworkManager/system-connections/35370b0b-e53b-42ea-9fe3-f1b1d552343b.nmmeta" failed
    &lt;trace&gt; [1564647990.7822] keyfile: commit: deleting nmmeta file "/etc/NetworkManager/system-connections/35370b0b-e53b-42ea-9fe3-f1b1d552343b.nmmeta" simulated

I think that was due to SELinux (rh #1738010).

Let nms_keyfile_nmmeta_write() return an errno code so we can log
more information about the failure.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared,all: return boolean success from nm_utils_file_get_contents()</title>
<updated>2019-08-08T09:59:59+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-08T09:09:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b216abb012b97a7e0e50b969e4a04c8b11a4cbe9'/>
<id>b216abb012b97a7e0e50b969e4a04c8b11a4cbe9</id>
<content type='text'>
... and nm_utils_fd_get_contents() and nm_utils_file_set_contents().

Don't mix negative errno return value with a GError output. Instead,
return a boolean result indicating success or failure.

Also, optionally

  - output GError

  - set out_errsv to the positive errno (or 0 on success)

Obviously, the return value and the output arguments (contents, length,
out_errsv, error) must all agree in their success/failure result.
That means, you may check any of the return value, out_errsv, error, and
contents to reliably detect failure or success.

Also note that out_errsv gives the positive(!) errno. But you probably
shouldn't care about the distinction and use nm_errno_native() either
way to normalize the value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... and nm_utils_fd_get_contents() and nm_utils_file_set_contents().

Don't mix negative errno return value with a GError output. Instead,
return a boolean result indicating success or failure.

Also, optionally

  - output GError

  - set out_errsv to the positive errno (or 0 on success)

Obviously, the return value and the output arguments (contents, length,
out_errsv, error) must all agree in their success/failure result.
That means, you may check any of the return value, out_errsv, error, and
contents to reliably detect failure or success.

Also note that out_errsv gives the positive(!) errno. But you probably
shouldn't care about the distinction and use nm_errno_native() either
way to normalize the value.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: let nm_utils_file_set_contents() return a errno error code</title>
<updated>2019-08-08T08:53:03+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-01T08:59:36+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1bad35061fb3d0807048601b404619ad816be28b'/>
<id>1bad35061fb3d0807048601b404619ad816be28b</id>
<content type='text'>
nm_utils_file_set_contents() is a re-implementation of g_file_set_contents(),
as such it returned merely a boolean success value.

It's sometimes interesting to get the native error code. Let the function
deviate from glib's original g_file_set_contents() and return the error code
(as negative value) instead.

This requires all callers to change. Also, it's potentially a dangerous
change, as this is easy to miss.

Note that nm_utils_file_get_contents() also returns an errno, and
already deviates from g_file_get_contents() in the same way. This patch
resolves at least the inconsistency with nm_utils_file_get_contents().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nm_utils_file_set_contents() is a re-implementation of g_file_set_contents(),
as such it returned merely a boolean success value.

It's sometimes interesting to get the native error code. Let the function
deviate from glib's original g_file_set_contents() and return the error code
(as negative value) instead.

This requires all callers to change. Also, it's potentially a dangerous
change, as this is easy to miss.

Note that nm_utils_file_get_contents() also returns an errno, and
already deviates from g_file_get_contents() in the same way. This patch
resolves at least the inconsistency with nm_utils_file_get_contents().
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: improve usage/synposis for nm-update2.py and nm-add-connection2.py</title>
<updated>2019-08-08T08:53:03+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-01T08:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=041a95229722c57a21492f69d3fbb9805bfe05e6'/>
<id>041a95229722c57a21492f69d3fbb9805bfe05e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>secret-agent: merge branch 'th/secret-agent-cleanup'</title>
<updated>2019-08-08T08:12:17+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-08T08:12:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=244d8bf6044691e44465691dedc6359811e5f5dc'/>
<id>244d8bf6044691e44465691dedc6359811e5f5dc</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/231
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/231
</pre>
</div>
</content>
</entry>
</feed>
