<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/vpn, branch th/fix-python-test</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>all: SPDX header conversion</title>
<updated>2019-09-10T09:19:56+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2019-09-10T09:19:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=24028a22467275671df71cc6a8054036b37d8f03'/>
<id>24028a22467275671df71cc6a8054036b37d8f03</id>
<content type='text'>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  $ find * -type f |xargs perl contrib/scripts/spdx.pl
  $ git rm contrib/scripts/spdx.pl
</pre>
</div>
</content>
</entry>
<entry>
<title>firewall: refactor "nm-firewall-manager.c" to not use GDBusProxy</title>
<updated>2019-08-07T11:21:48+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-03T12:20:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1b59d752beec43b82e53a4d14d9c6c5a09ceee86'/>
<id>1b59d752beec43b82e53a4d14d9c6c5a09ceee86</id>
<content type='text'>
- Don't use GDBusProxy but plain GDBusConnection. NMFirewallManager
  is very simple, it doesn't use any of the features that GDBusProxy
  provides.

- make NMFirewallManagerCallId typedef a pointer to the opaque call-id
  struct, instead of the struct itself. It's confusing to have a
  variable that does not look like a pointer and assigning %NULL to
  it.

- internally drop the CBInfo typename and name the call-id variable
  constsistantly as "call_id".

- no need to keep the call-id struct alive after cancelling it. That
  simplifies the lifetime managment of the pending call because the
  completion callback is always invoked shortly before destroying
  the call-id.

- note that the caller is no longer allowed to cancel a call-id from
  inside the completion callback. That just complicates the
  implementation and is not necessary. Assert against that.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/230
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Don't use GDBusProxy but plain GDBusConnection. NMFirewallManager
  is very simple, it doesn't use any of the features that GDBusProxy
  provides.

- make NMFirewallManagerCallId typedef a pointer to the opaque call-id
  struct, instead of the struct itself. It's confusing to have a
  variable that does not look like a pointer and assigning %NULL to
  it.

- internally drop the CBInfo typename and name the call-id variable
  constsistantly as "call_id".

- no need to keep the call-id struct alive after cancelling it. That
  simplifies the lifetime managment of the pending call because the
  completion callback is always invoked shortly before destroying
  the call-id.

- note that the caller is no longer allowed to cancel a call-id from
  inside the completion callback. That just complicates the
  implementation and is not necessary. Assert against that.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/230
</pre>
</div>
</content>
</entry>
<entry>
<title>all: drop emacs file variables from source files</title>
<updated>2019-06-11T08:04:00+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-06-02T12:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c0e075c90263150bd00ea033dbbd2d8e6b05300e'/>
<id>c0e075c90263150bd00ea033dbbd2d8e6b05300e</id>
<content type='text'>
We no longer add these. If you use Emacs, configure it yourself.

Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.

No manual changes, just ran commands:

    F=($(git grep -l -e '-\*-'))
    sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
    sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"

Check remaining lines with:

    git grep -e '-\*-'

The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We no longer add these. If you use Emacs, configure it yourself.

Also, due to our "smart-tab" usage the editor anyway does a subpar
job handling our tabs. However, on the upside every user can choose
whatever tab-width he/she prefers. If "smart-tabs" are used properly
(like we do), every tab-width will work.

No manual changes, just ran commands:

    F=($(git grep -l -e '-\*-'))
    sed '1 { /\/\* *-\*-  *[mM]ode.*\*\/$/d }'     -i "${F[@]}"
    sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}"

Check remaining lines with:

    git grep -e '-\*-'

The ultimate purpose of this is to cleanup our files and eventually use
SPDX license identifiers. For that, first get rid of the boilerplate lines.
</pre>
</div>
</content>
</entry>
<entry>
<title>dispatcher: replace guint call-id by opaque NMDispatcherCallId</title>
<updated>2019-05-27T10:39:37+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-05-23T11:57:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c3e2959a5adc730648a616d5299ae9f62aba266f'/>
<id>c3e2959a5adc730648a616d5299ae9f62aba266f</id>
<content type='text'>
A guint value can wrap, so we would need to check that we don't allocate duplicate
IDs (which we currently don't, and it's likely never to actually hit).

Just expose the (opaque) pointer of the call-id.

We still keep a "request_id", but that is only for logging purpose.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A guint value can wrap, so we would need to check that we don't allocate duplicate
IDs (which we currently don't, and it's likely never to actually hit).

Just expose the (opaque) pointer of the call-id.

We still keep a "request_id", but that is only for logging purpose.
</pre>
</div>
</content>
</entry>
<entry>
<title>pacrunner: refactor pacrunner to use GDBusConnection</title>
<updated>2019-05-13T07:24:02+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-05-05T07:51:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=83476a3fb64efa0b04630469aa901f99e4de121a'/>
<id>83476a3fb64efa0b04630469aa901f99e4de121a</id>
<content type='text'>
- use GDBusConnection instead of GDBusProxy.

- rename "call-id" to "conf-id". It's really not a "call" but
  configuration that gets added and NMPacrunnerManager ensures that
  the configuration is send to pacrunner.

- let "conf-id" keep a reference to NMPacrunnerManager. For one,
  when we remove configurations we need to call DestroyProxyConfiguration
  to remove it again. We cannot just abort the requests but must linger
  around until our configuration is properly cleaned up. Hence, we
  anyway cannot destroy the NMPacrunnerManager earlier.
  With respect to fixing shutdown not to leak anything, this merely
  means that we must wait (and iterate the main loop) as long as
  NMPacrunnerManager singleton still exits (that is anyway the plan
  how to fix shutdown).
  With these considerations it's also clear that our D-Bus calls must
  have a stricter timeout: NM_SHUTDOWN_TIMEOUT_MS.
  This is also nice because nm_pacrunner_manager_remove() no longer
  needs a manager parameter, it can just rely on having a reference
  to the manager.

- for logging the configuration IDs, don't log pointer values.
  Logging pointer values should be avoided as it defeats ASLR.
  Instead, give them a "log_id" number.

- pacrunner is a D-Bus activatable service. D-Bus activatable services
  needs special care. We don't want to start it over and over again.
  Instead, we only try to "StartServiceByName" if

    - we have any configuration to add

    - if pacrunner is currently confirmed not to be running (by watching
      name owner changes)

    - we didn't try to start it already. That means, only start it
      at the beginning and afterwards set a flag to block it. When
      we see pacrunner appear on D-Bus we always clear that flag,
      that means if pacrunner drops of, we will try to restart it
      (once).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- use GDBusConnection instead of GDBusProxy.

- rename "call-id" to "conf-id". It's really not a "call" but
  configuration that gets added and NMPacrunnerManager ensures that
  the configuration is send to pacrunner.

- let "conf-id" keep a reference to NMPacrunnerManager. For one,
  when we remove configurations we need to call DestroyProxyConfiguration
  to remove it again. We cannot just abort the requests but must linger
  around until our configuration is properly cleaned up. Hence, we
  anyway cannot destroy the NMPacrunnerManager earlier.
  With respect to fixing shutdown not to leak anything, this merely
  means that we must wait (and iterate the main loop) as long as
  NMPacrunnerManager singleton still exits (that is anyway the plan
  how to fix shutdown).
  With these considerations it's also clear that our D-Bus calls must
  have a stricter timeout: NM_SHUTDOWN_TIMEOUT_MS.
  This is also nice because nm_pacrunner_manager_remove() no longer
  needs a manager parameter, it can just rely on having a reference
  to the manager.

- for logging the configuration IDs, don't log pointer values.
  Logging pointer values should be avoided as it defeats ASLR.
  Instead, give them a "log_id" number.

- pacrunner is a D-Bus activatable service. D-Bus activatable services
  needs special care. We don't want to start it over and over again.
  Instead, we only try to "StartServiceByName" if

    - we have any configuration to add

    - if pacrunner is currently confirmed not to be running (by watching
      name owner changes)

    - we didn't try to start it already. That means, only start it
      at the beginning and afterwards set a flag to block it. When
      we see pacrunner appear on D-Bus we always clear that flag,
      that means if pacrunner drops of, we will try to restart it
      (once).
</pre>
</div>
</content>
</entry>
<entry>
<title>core: use nm_connection_get_setting_ip_config() helper</title>
<updated>2019-03-05T11:23:59+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-03-02T21:17:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=186c5b7a6528569e51972230d48f3325ec8767ef'/>
<id>186c5b7a6528569e51972230d48f3325ec8767ef</id>
<content type='text'>
(cherry picked from commit 2be022ad68158acd544704244a7d3193aa6545a7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 2be022ad68158acd544704244a7d3193aa6545a7)
</pre>
</div>
</content>
</entry>
<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>all: drop unnecessary includes of &lt;errno.h&gt; and &lt;string.h&gt;</title>
<updated>2019-02-12T07:50:28+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-01-31T12:44:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a3370af3a8a965e41950c5022182730d79614df2'/>
<id>a3370af3a8a965e41950c5022182730d79614df2</id>
<content type='text'>
"nm-macros-interal.h" already includes &lt;errno.h&gt; and &lt;string.h&gt;.
No need to include it everywhere else too.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"nm-macros-interal.h" already includes &lt;errno.h&gt; and &lt;string.h&gt;.
No need to include it everywhere else too.
</pre>
</div>
</content>
</entry>
<entry>
<title>vpn: add route to vpn gw when parent has a default device route</title>
<updated>2019-02-04T10:07:02+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2019-02-03T10:15:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=797eab2f6b97db35d78c558ca2b37cff1cdc936f'/>
<id>797eab2f6b97db35d78c558ca2b37cff1cdc936f</id>
<content type='text'>
When the parent device has a device default route (i.e. without
gateway) and we establish a VPN on top of it, 'ip route get' for the
VPN gateway returns a device route, which is the same result we get
for an unreachable VPN gateway. However it is necessary to add the
route to the gateway or otherwise it will possibly become unreachable
once the VPN gets activated.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/93
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the parent device has a device default route (i.e. without
gateway) and we establish a VPN on top of it, 'ip route get' for the
VPN gateway returns a device route, which is the same result we get
for an unreachable VPN gateway. However it is necessary to add the
route to the gateway or otherwise it will possibly become unreachable
once the VPN gets activated.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/93
</pre>
</div>
</content>
</entry>
<entry>
<title>all/trivial: rename NM_UTILS_LOOKUP_STR() to have "_A" suffix</title>
<updated>2019-01-15T08:52:01+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-01-10T08:17:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=617bdbd8c274caea00c964315b7e7c2db32febf9'/>
<id>617bdbd8c274caea00c964315b7e7c2db32febf9</id>
<content type='text'>
NM_UTILS_LOOKUP_STR() uses alloca(). Partly to avoid the overhead of
malloc(), but more important because it's convenient to use. It does
not require to declare a varible to manage the lifetime of the heap
allocation.

It's quite safe, because the stack allocation is of a fixed size of only
a few bytes. Overall, I think the convenience that we get (resulting in
simpler code) outweighs the danger of stack allocation in this case. It's
still worth it.
However, as it uses alloca(), it still must not be used inside a (unbound)
loop and it is obviously a macro.

Rename the macros to have a _A() suffix. This should make the
peculiarities more apparent.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NM_UTILS_LOOKUP_STR() uses alloca(). Partly to avoid the overhead of
malloc(), but more important because it's convenient to use. It does
not require to declare a varible to manage the lifetime of the heap
allocation.

It's quite safe, because the stack allocation is of a fixed size of only
a few bytes. Overall, I think the convenience that we get (resulting in
simpler code) outweighs the danger of stack allocation in this case. It's
still worth it.
However, as it uses alloca(), it still must not be used inside a (unbound)
loop and it is obviously a macro.

Rename the macros to have a _A() suffix. This should make the
peculiarities more apparent.
</pre>
</div>
</content>
</entry>
</feed>
