<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/ndisc, branch th/cli-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>ndisc: fix ordering of gateways</title>
<updated>2017-11-03T09:44:48+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-11-03T09:28:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=db41380c15f0ef545f79597bc4126ee461d2ec84'/>
<id>db41380c15f0ef545f79597bc4126ee461d2ec84</id>
<content type='text'>
Insert the new gateway at the end when it has the least preference.

Fixes the following runtime error:
 src/ndisc/nm-ndisc.c:204:_ASSERT_data_gateways: assertion failed:
 (_preference_to_priority (item_prev-&gt;preference) &gt;=
 _preference_to_priority (item-&gt;preference))
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Insert the new gateway at the end when it has the least preference.

Fixes the following runtime error:
 src/ndisc/nm-ndisc.c:204:_ASSERT_data_gateways: assertion failed:
 (_preference_to_priority (item_prev-&gt;preference) &gt;=
 _preference_to_priority (item-&gt;preference))
</pre>
</div>
</content>
</entry>
<entry>
<title>core: merge IPv4 and IPv6 implementation of nm_utils_ip4_property_path()</title>
<updated>2017-10-24T14:05:40+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-23T11:55:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=32b3eb11814e522e18800d0d402d84d170a6f456'/>
<id>32b3eb11814e522e18800d0d402d84d170a6f456</id>
<content type='text'>
and nm_utils_ip6_property_path().

Also, rename to nm_utils_sysctl_ip_conf_path().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and nm_utils_ip6_property_path().

Also, rename to nm_utils_sysctl_ip_conf_path().
</pre>
</div>
</content>
</entry>
<entry>
<title>core: don't use static buffer for nm_utils_ip4_property_path()</title>
<updated>2017-10-24T14:04:46+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-23T11:55:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6e01238a407ac546bf20fd23998b28cde672aeba'/>
<id>6e01238a407ac546bf20fd23998b28cde672aeba</id>
<content type='text'>
and nm_utils_ip6_property_path(). The API with static buffers
looks a bit nicer. But I think they are dangerous, because
we tend to pass the buffer down several layers of the stack, and
it's not immediately clear, that we don't overwrite the static
buffer again (which we probably did not, but it's hard to verify
that there is no bug there).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and nm_utils_ip6_property_path(). The API with static buffers
looks a bit nicer. But I think they are dangerous, because
we tend to pass the buffer down several layers of the stack, and
it's not immediately clear, that we don't overwrite the static
buffer again (which we probably did not, but it's hard to verify
that there is no bug there).
</pre>
</div>
</content>
</entry>
<entry>
<title>ndisc: some cleanup of RA handling</title>
<updated>2017-10-12T08:27:27+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-09T16:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5b507d5787b74d58fdfc97c4c381cc48b150ccba'/>
<id>5b507d5787b74d58fdfc97c4c381cc48b150ccba</id>
<content type='text'>
- add assert code to check that our internal tracking of
  the gateways is consistent.

- assert (gracefully) against libndp returning :: as gateway
  address.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- add assert code to check that our internal tracking of
  the gateways is consistent.

- assert (gracefully) against libndp returning :: as gateway
  address.
</pre>
</div>
</content>
</entry>
<entry>
<title>ndisc: rename NMNDiscPreference to NMIcmpv6RouterPref</title>
<updated>2017-10-12T08:27:27+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-09T09:56:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=32142a63e8234e5fc5034349c8cc0cca29847790'/>
<id>32142a63e8234e5fc5034349c8cc0cca29847790</id>
<content type='text'>
We encounter the same enum in 3 forms:

  - NMNDiscPreference in NetworkManager
  - "enum ndp_route_preference" in &lt;ndp.h&gt;
  - ICMPV6_ROUTER_PREF_* in &lt;linux/icmpv6.h&gt;

Move our enum to nm-core-utils.h, so that it can be used
by platform code as well (platform code should not include
ndisc/nm-ndisc.h).

Also, NMNDiscPreference was not numerically identical to their
native values (meaning: it shuffled the names and numbers).
Make them all numerically equal, so that they can be used in
the same context.
This means, while previously we could compare NMNDiscPreference
directly according to their priority, we now need _preference_to_priority().
On the other hand, we could omit translate_preference() -- but actually,
we still have _route_preference_coerce() because pref comes from libndp
and is thus untrusted. We still have to range check it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We encounter the same enum in 3 forms:

  - NMNDiscPreference in NetworkManager
  - "enum ndp_route_preference" in &lt;ndp.h&gt;
  - ICMPV6_ROUTER_PREF_* in &lt;linux/icmpv6.h&gt;

Move our enum to nm-core-utils.h, so that it can be used
by platform code as well (platform code should not include
ndisc/nm-ndisc.h).

Also, NMNDiscPreference was not numerically identical to their
native values (meaning: it shuffled the names and numbers).
Make them all numerically equal, so that they can be used in
the same context.
This means, while previously we could compare NMNDiscPreference
directly according to their priority, we now need _preference_to_priority().
On the other hand, we could omit translate_preference() -- but actually,
we still have _route_preference_coerce() because pref comes from libndp
and is thus untrusted. We still have to range check it.
</pre>
</div>
</content>
</entry>
<entry>
<title>ndisc: cleanup handling of timestamps</title>
<updated>2017-10-12T08:27:27+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-10T08:35:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7d59641d005aeb23a64f3022473dbed087786151'/>
<id>7d59641d005aeb23a64f3022473dbed087786151</id>
<content type='text'>
We have the timestamp nm_utils_get_monotonic_time_s(), which should be
gint32 type. Then we also have timestamps in the NMNDisc* objects, which
consist of guint32 timestamp and lifetime.

Cleanup handling the times and calculation of the timestamps by using
the correct integer type consistently and ensuring that no integer overflow
occurs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have the timestamp nm_utils_get_monotonic_time_s(), which should be
gint32 type. Then we also have timestamps in the NMNDisc* objects, which
consist of guint32 timestamp and lifetime.

Cleanup handling the times and calculation of the timestamps by using
the correct integer type consistently and ensuring that no integer overflow
occurs.
</pre>
</div>
</content>
</entry>
<entry>
<title>ndisc: use unsigned int for loop index variable</title>
<updated>2017-10-12T08:27:27+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-10T07:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cd954702d1be8bc790f0685e2d7f2dd638d62b35'/>
<id>cd954702d1be8bc790f0685e2d7f2dd638d62b35</id>
<content type='text'>
The @i variable to loop over the arrays should have the same type as
GArray.len, to which it is compared. In this case "guint".

As we remove items from the arrays while iterating over it, it gets
a bit complicated either way. I disliked that

  g_array_remove_index (rdata-&gt;gateways, i--);

would underflow for unsigned integers. While that would work fine,
I think that is confusing. So, the variable is no longer incremented
in the increment statement of the for loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The @i variable to loop over the arrays should have the same type as
GArray.len, to which it is compared. In this case "guint".

As we remove items from the arrays while iterating over it, it gets
a bit complicated either way. I disliked that

  g_array_remove_index (rdata-&gt;gateways, i--);

would underflow for unsigned integers. While that would work fine,
I think that is confusing. So, the variable is no longer incremented
in the increment statement of the for loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: rework tracking of gateway/default-route in ip-config</title>
<updated>2017-10-10T06:46:47+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-10-04T13:21:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5c299454b49b165f645c25fd3e083c0bb747ad91'/>
<id>5c299454b49b165f645c25fd3e083c0bb747ad91</id>
<content type='text'>
Instead of having 3 properties @gateway, @never_default and @has_gateway
on NMIP4Config/NMIP6Config that determine the default-route, track the
default-route as a regular route.

The gateway setting is the configuration knob for the default-route.
Since an NMIP4Config/NMIP6Config instance only has one gateway property,
it cannot track more then one default-routes (see related bug rh#1445417).
Especially with policy routing, it might be interesting to configure a
default-route in multiple tables.

Also, later it might be interesting to allow adding default-routes as
regular static routes in a connection, so that the user can configure additional
route parameters for the default-route or add default-routes in multiple tables.

With this patch, default-routes now have a rt_source property according to their
origin.

Also, the previous commits of this branch broke handling of the
default-route :) . That should be working now again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having 3 properties @gateway, @never_default and @has_gateway
on NMIP4Config/NMIP6Config that determine the default-route, track the
default-route as a regular route.

The gateway setting is the configuration knob for the default-route.
Since an NMIP4Config/NMIP6Config instance only has one gateway property,
it cannot track more then one default-routes (see related bug rh#1445417).
Especially with policy routing, it might be interesting to configure a
default-route in multiple tables.

Also, later it might be interesting to allow adding default-routes as
regular static routes in a connection, so that the user can configure additional
route parameters for the default-route or add default-routes in multiple tables.

With this patch, default-routes now have a rt_source property according to their
origin.

Also, the previous commits of this branch broke handling of the
default-route :) . That should be working now again.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: move setting NDisc addresses/routes to NMIP6Config</title>
<updated>2017-08-24T08:48:03+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-08-16T11:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=057b63979e0c3c345321dbc1fdfc1068dd55cdca'/>
<id>057b63979e0c3c345321dbc1fdfc1068dd55cdca</id>
<content type='text'>
Add an utility function for resetting addresses/routes of NMIP6Config
from NMNDisc data. For one, this de-duplicates code in device and
nm-iface-helper.

Also, we no longer first reset (delete) all addresses and add them anew.
Instead, we first mark all entries as dirty for deletion, merge (append)
the new entires, and delete the remaining dirty entires. This saves a
extra work, in the expected case where NMIP6Config already contains
several of the new entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an utility function for resetting addresses/routes of NMIP6Config
from NMNDisc data. For one, this de-duplicates code in device and
nm-iface-helper.

Also, we no longer first reset (delete) all addresses and add them anew.
Instead, we first mark all entries as dirty for deletion, merge (append)
the new entires, and delete the remaining dirty entires. This saves a
extra work, in the expected case where NMIP6Config already contains
several of the new entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>ndisc: log the device context</title>
<updated>2017-03-24T11:42:09+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2017-03-02T20:17:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c307163b77b4b7df68d79972dae8d2627643afff'/>
<id>c307163b77b4b7df68d79972dae8d2627643afff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
