<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git, branch th/supplicant</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>wifi: track access point via hash table for supplicant D-Bus path</title>
<updated>2020-03-10T17:40:58+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-03T12:16:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7e248f37da00ca53e4698a6a9641ccef349b923b'/>
<id>7e248f37da00ca53e4698a6a9641ccef349b923b</id>
<content type='text'>
Let's not do linear search. Use a hash table to find the AP by D-Bus
path.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's not do linear search. Use a hash table to find the AP by D-Bus
path.
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: expose NMRefString for nm_wifi_ap_get_supplicant_path()</title>
<updated>2020-03-09T12:51:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-03T12:09:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=2f5a89a51265feb22ec55139fce759b439eb3659'/>
<id>2f5a89a51265feb22ec55139fce759b439eb3659</id>
<content type='text'>
We internally track the string as NMRefString. Expose it, so that
users can directly use the reference counted string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We internally track the string as NMRefString. Expose it, so that
users can directly use the reference counted string.
</pre>
</div>
</content>
</entry>
<entry>
<title>supplicant: large rework of wpa_supplicant handling</title>
<updated>2020-03-09T12:51:23+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-01-21T14:05:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=ba58aa9c65a741781127b6d6f1ab046000c72f52'/>
<id>ba58aa9c65a741781127b6d6f1ab046000c72f52</id>
<content type='text'>
Avoid GDBusProxy, instead use GDBusConnection directly. I very much
prefer this because that way we have explicit control over what happens
on D-Bus. With GDBusProxy this is hidden under another layer of complex
code. The hardest part when using a D-Bus interface is to manage the
state via an asynchronous medium. GDBusProxy contains state about the
D-Bus interface and duplicate the state that we track. This makes it hard
to reason about things.

Rework creation of NMSupplicantInterface. Previously, a NMSupplicantInterface
had multiple initialization states. In particular, the first state would not
yet tie the interface to a certain D-Bus object path. Instead, NMSupplicantInterface
would try and retry to create the D-Bus object.
Now, NMSupplicantManager has an asynchronous method to create interface
instances. The manager only creates an interface instance after the D-Bus
path is known. That means, a NMSupplicantInterface instance is now
strongly tied to a name-owner and D-Bus path.

It follows that the state of NMSupplicantInterface can only go from STARTING,
via the supplicant states, to DOWN. Never back. That was already previously
the case that the state from DOWN was final and once the 3 initial
states were passed, the interface's state would never go back to the initial
state. Now this is more strict and more formalized. The 3 initialization states
are combined.

I think the tighter state handling simplifies users of NMSupplicantInterface.
See for example "nm-device-ethernet.c". It's still complicated, because handling
state is fundamentally difficult.

NMSupplicantManager will take care to D-Bus activate wpa_supplicant only
when necessary (poke). Previously, creating the manager instance
would always start suppliant service. Now, it's started on demand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid GDBusProxy, instead use GDBusConnection directly. I very much
prefer this because that way we have explicit control over what happens
on D-Bus. With GDBusProxy this is hidden under another layer of complex
code. The hardest part when using a D-Bus interface is to manage the
state via an asynchronous medium. GDBusProxy contains state about the
D-Bus interface and duplicate the state that we track. This makes it hard
to reason about things.

Rework creation of NMSupplicantInterface. Previously, a NMSupplicantInterface
had multiple initialization states. In particular, the first state would not
yet tie the interface to a certain D-Bus object path. Instead, NMSupplicantInterface
would try and retry to create the D-Bus object.
Now, NMSupplicantManager has an asynchronous method to create interface
instances. The manager only creates an interface instance after the D-Bus
path is known. That means, a NMSupplicantInterface instance is now
strongly tied to a name-owner and D-Bus path.

It follows that the state of NMSupplicantInterface can only go from STARTING,
via the supplicant states, to DOWN. Never back. That was already previously
the case that the state from DOWN was final and once the 3 initial
states were passed, the interface's state would never go back to the initial
state. Now this is more strict and more formalized. The 3 initialization states
are combined.

I think the tighter state handling simplifies users of NMSupplicantInterface.
See for example "nm-device-ethernet.c". It's still complicated, because handling
state is fundamentally difficult.

NMSupplicantManager will take care to D-Bus activate wpa_supplicant only
when necessary (poke). Previously, creating the manager instance
would always start suppliant service. Now, it's started on demand.
</pre>
</div>
</content>
</entry>
<entry>
<title>wifi: delay release of old wfd_ies array in nm_wifi_p2p_peer_set_wfd_ies()</title>
<updated>2020-03-08T07:30:43+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2020-03-03T10:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b6e61651fd0b49259b26aca721b906ada2959ac5'/>
<id>b6e61651fd0b49259b26aca721b906ada2959ac5</id>
<content type='text'>
We should first ref the new instance and emit the notify signal,
before unref the old value. It feels better in this order.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should first ref the new instance and emit the notify signal,
before unref the old value. It feels better in this order.
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: merge branch 'ac/fix_miimon_updelay'</title>
<updated>2020-03-06T11:08:45+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-03-06T11:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=fff100b4523b4a92da99dbf164885dbc810cbe38'/>
<id>fff100b4523b4a92da99dbf164885dbc810cbe38</id>
<content type='text'>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/424
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/424
</pre>
</div>
</content>
</entry>
<entry>
<title>nmtui: only set 'mode' and enable 'miimon' when setting up a new connection</title>
<updated>2020-03-06T09:39:00+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-03-04T15:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=40ea0335d0ce2a4390abc41c9735a5b805773a28'/>
<id>40ea0335d0ce2a4390abc41c9735a5b805773a28</id>
<content type='text'>
When creating a new connection before the user gets the chance to modify
the bond options let's just initialize 'mode' and 'miimon' (with related
'updelay' and 'downdelay').

Initializing also 'arp_interval', 'arp_ip_target' and 'primary' doesn't
make much sense as by default they're disabled or contain empty values.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a new connection before the user gets the chance to modify
the bond options let's just initialize 'mode' and 'miimon' (with related
'updelay' and 'downdelay').

Initializing also 'arp_interval', 'arp_ip_target' and 'primary' doesn't
make much sense as by default they're disabled or contain empty values.
</pre>
</div>
</content>
</entry>
<entry>
<title>nm-setting-bond: add API to libnm to get the normalized bond option value</title>
<updated>2020-03-06T09:39:00+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-03-03T10:36:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b868fee9cb7b09b1e5d1c269f0591cb036813d79'/>
<id>b868fee9cb7b09b1e5d1c269f0591cb036813d79</id>
<content type='text'>
Add 'nm_setting_bond_get_option_normalized()', the purpose of this API
is to retrieve a bond option normalized value which is the option that
NetworkManager will actually apply to the bond when activating the
connection, this takes into account default values for some options that
NM assumes.

For example, if you create a connection:
$ nmcli c add type bond con-name nm-bond ifname bond0 bond.options mode=0

Calling 'nm_setting_bond_get_option_normalized(s_bond, "miimon")' would
return "100" as even if not specified NetworkManager enables miimon for
bond connections.

Another example:
$ nmcli c add type bond con-name nm-bond ifname bond0 bond.options mode=0,arp_interval=100

Calling 'nm_setting_bond_get_option_normalized(s_bond, "miimon")' would
return NULL in this case because NetworkManager disables miimon if
'arp_interval' is set explicitly but 'miimon' is not.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'nm_setting_bond_get_option_normalized()', the purpose of this API
is to retrieve a bond option normalized value which is the option that
NetworkManager will actually apply to the bond when activating the
connection, this takes into account default values for some options that
NM assumes.

For example, if you create a connection:
$ nmcli c add type bond con-name nm-bond ifname bond0 bond.options mode=0

Calling 'nm_setting_bond_get_option_normalized(s_bond, "miimon")' would
return "100" as even if not specified NetworkManager enables miimon for
bond connections.

Another example:
$ nmcli c add type bond con-name nm-bond ifname bond0 bond.options mode=0,arp_interval=100

Calling 'nm_setting_bond_get_option_normalized(s_bond, "miimon")' would
return NULL in this case because NetworkManager disables miimon if
'arp_interval' is set explicitly but 'miimon' is not.
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: bond options logic rework</title>
<updated>2020-03-06T09:39:00+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-02-21T10:41:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9bd07336ef16f014b35f66a7d0d03bc49703b039'/>
<id>9bd07336ef16f014b35f66a7d0d03bc49703b039</id>
<content type='text'>
Add '_nm_setting_bond_get_option_or_default()' and move all the custom
policies applied by NM for bond options in there.

One such example of a custom policy is to set 'miimon' to 0 (instead of its
default value of 100) if 'arp_interval' is explicitly enabled
and 'miimon' is not.

This means removing every piece of logic from
nm_setting_bond_add_option() which used to clear out 'arp_interval' and
'arp_ip_target' if 'miimon' was set or clear out 'miimon' along with
'downdelay', 'updelay' and 'miimon' if 'arp_interval' was set.
This behaviour is a bug since the kernel allow setting any combination
of this options for bonds and NetworkManager should not limit the user
to do so.

Also use 'set_bond_attr_or_default()' instead of 'set_bond_attr()' as
the former calls '_nm_setting_bond_get_option_or_default()' to implement
the right logic to retrieve bond options according to current bond
configuration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add '_nm_setting_bond_get_option_or_default()' and move all the custom
policies applied by NM for bond options in there.

One such example of a custom policy is to set 'miimon' to 0 (instead of its
default value of 100) if 'arp_interval' is explicitly enabled
and 'miimon' is not.

This means removing every piece of logic from
nm_setting_bond_add_option() which used to clear out 'arp_interval' and
'arp_ip_target' if 'miimon' was set or clear out 'miimon' along with
'downdelay', 'updelay' and 'miimon' if 'arp_interval' was set.
This behaviour is a bug since the kernel allow setting any combination
of this options for bonds and NetworkManager should not limit the user
to do so.

Also use 'set_bond_attr_or_default()' instead of 'set_bond_attr()' as
the former calls '_nm_setting_bond_get_option_or_default()' to implement
the right logic to retrieve bond options according to current bond
configuration.
</pre>
</div>
</content>
</entry>
<entry>
<title>nm-setting-bond: let 'miimon' and 'arp_interval' coexist for verify()</title>
<updated>2020-03-06T09:39:00+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-02-21T10:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=57bdf68088a8b4f5f5799ebcec97dfbb3d45fbab'/>
<id>57bdf68088a8b4f5f5799ebcec97dfbb3d45fbab</id>
<content type='text'>
Fix 'miimon' and 'arp_interval' validation, they can both be set indeed,
the kernel does not impose this limitation, nevertheless is sensible to
keep the defaults as previously (miimon=100, arp_interval=0).

Also add unit test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix 'miimon' and 'arp_interval' validation, they can both be set indeed,
the kernel does not impose this limitation, nevertheless is sensible to
keep the defaults as previously (miimon=100, arp_interval=0).

Also add unit test.
</pre>
</div>
</content>
</entry>
<entry>
<title>nm-setting-bond: if unset consider bond options with default values for validation</title>
<updated>2020-03-06T09:39:00+00:00</updated>
<author>
<name>Antonio Cardace</name>
<email>acardace@redhat.com</email>
</author>
<published>2020-02-20T14:38:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c07f3b518c42397e452125bcd2d73e3a8459fef6'/>
<id>c07f3b518c42397e452125bcd2d73e3a8459fef6</id>
<content type='text'>
Doing 'verify()' with options such as 'miimon' and 'num_grat_arp' set to
arbitrary values it's not consistent with what NetworkManager does to
bond options when activating the bond through 'apply_bonding_config()'
(at a later stage) because the said values do not
correspond to what the default values for those options are.

This leads to an inconsistency with the 'miimon' parameter for example,
where 'verify()' is done while assuming it's 0 if not set but its
default value is actually 100.

Fixes: 8775c25c3318 ('libnm: verify bond option in defined order')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doing 'verify()' with options such as 'miimon' and 'num_grat_arp' set to
arbitrary values it's not consistent with what NetworkManager does to
bond options when activating the bond through 'apply_bonding_config()'
(at a later stage) because the said values do not
correspond to what the default values for those options are.

This leads to an inconsistency with the 'miimon' parameter for example,
where 'verify()' is done while assuming it's 0 if not set but its
default value is actually 100.

Fixes: 8775c25c3318 ('libnm: verify bond option in defined order')
</pre>
</div>
</content>
</entry>
</feed>
