<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/devices/nm-acd-manager.c, 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>acd: fix memleak in acd_event()</title>
<updated>2019-08-27T16:19:01+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-08-27T16:16:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0300c1823ae4f13d3f0c3df10edc84fc217013c7'/>
<id>0300c1823ae4f13d3f0c3df10edc84fc217013c7</id>
<content type='text'>
Only happens with debug logging enabled. So, not a large problem.

Found by Coverity.

Fixes: d9a4b59c18e3 ('acd: adapt NM code and build options')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only happens with debug logging enabled. So, not a large problem.

Found by Coverity.

Fixes: d9a4b59c18e3 ('acd: adapt NM code and build options')
</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>acd: return error code from nm_acd_manager_start_probe()</title>
<updated>2019-04-04T07:56:19+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-04-02T15:44:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e90f4c31b0ed2605bcf8702c82f501040677892b'/>
<id>e90f4c31b0ed2605bcf8702c82f501040677892b</id>
<content type='text'>
... and nm_acd_manager_announce_addresses().

The test will need more information to know why it may fail.
Return a NetworkManager error code, instead of a boolean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... and nm_acd_manager_announce_addresses().

The test will need more information to know why it may fail.
Return a NetworkManager error code, instead of a boolean.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: replace g_strerror() calls with nm_strerror_native()</title>
<updated>2019-02-12T07:50:28+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2019-01-31T16:08:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a4fb6ddfca60c50cdf140d3f388209ace06e24ff'/>
<id>a4fb6ddfca60c50cdf140d3f388209ace06e24ff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>
<entry>
<title>all: don't use static buffer for nm_utils_inet*_ntop()</title>
<updated>2018-12-19T08:23:08+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-11-26T15:49:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a51c09dc12e2f1ba53a2239a0239fe98f66d628e'/>
<id>a51c09dc12e2f1ba53a2239a0239fe98f66d628e</id>
<content type='text'>
While nm_utils_inet*_ntop() accepts a %NULL buffer to fallback
to a static buffer, don't do that.

I find the possibility of using a static buffer here error prone
and something that should be avoided. There is of course the downside,
that in some cases it requires an additional line of code to allocate
the buffer on the stack as auto-variable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While nm_utils_inet*_ntop() accepts a %NULL buffer to fallback
to a static buffer, don't do that.

I find the possibility of using a static buffer here error prone
and something that should be avoided. There is of course the downside,
that in some cases it requires an additional line of code to allocate
the buffer on the stack as auto-variable.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: avoid calling platform code with invalid ifindex</title>
<updated>2018-12-03T12:47:42+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-12-03T12:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d45eed4437fda2bf84a4e5023d99873c42cadf84'/>
<id>d45eed4437fda2bf84a4e5023d99873c42cadf84</id>
<content type='text'>
Since commit 945c904f956 "platform: assert against valid ifindex and
remove duplicate assertions", it is no longer allowed to call certain
platform functions with invalid ifindex.

These trigger now an assertion. Note that the assertion is merely a
g_return_val_if_fail(), hence in non-debug mode, this does not lead to
a crash.

Fixes: 945c904f956580616f0d71b13c63f525c184060c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 945c904f956 "platform: assert against valid ifindex and
remove duplicate assertions", it is no longer allowed to call certain
platform functions with invalid ifindex.

These trigger now an assertion. Note that the assertion is merely a
g_return_val_if_fail(), hence in non-debug mode, this does not lead to
a crash.

Fixes: 945c904f956580616f0d71b13c63f525c184060c
</pre>
</div>
</content>
</entry>
<entry>
<title>acd: make NMAcdManager no GObject</title>
<updated>2018-09-27T15:36:42+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-09-20T08:15:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7729555a595871049caab7b5ea811ea04c4d3f8d'/>
<id>7729555a595871049caab7b5ea811ea04c4d3f8d</id>
<content type='text'>
NMAcdManager is a rather simple instance.

It does not need (thread-safe) ref-counting, in fact, having
it ref-counted makes it slighly ugly that we connect a signal,
but never bother to disconnect it (while the ref-counted instance
could outlife the signal subscriber).

We also don't need GObject signals. They have more overhead
and are less type-safe than a regular function pointers. Signals
would make sense, if there could be multiple independent listeners,
but that just doesn't make sense.

Implementing it as a plain struct is less lines of code, and less
runtime over head.

Also drop the possiblitiy to reset the NMAcdManager instance.
It wasn't needed and I think it was buggy because it wouldn't
reset the n-acd instance.

https://github.com/NetworkManager/NetworkManager/pull/213
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NMAcdManager is a rather simple instance.

It does not need (thread-safe) ref-counting, in fact, having
it ref-counted makes it slighly ugly that we connect a signal,
but never bother to disconnect it (while the ref-counted instance
could outlife the signal subscriber).

We also don't need GObject signals. They have more overhead
and are less type-safe than a regular function pointers. Signals
would make sense, if there could be multiple independent listeners,
but that just doesn't make sense.

Implementing it as a plain struct is less lines of code, and less
runtime over head.

Also drop the possiblitiy to reset the NMAcdManager instance.
It wasn't needed and I think it was buggy because it wouldn't
reset the n-acd instance.

https://github.com/NetworkManager/NetworkManager/pull/213
</pre>
</div>
</content>
</entry>
<entry>
<title>acd: fix crash in acd-event loop</title>
<updated>2018-09-20T07:48:26+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2018-09-20T07:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=29c95cd98adfd9fa0aa71b4958d14b77b5a90e9d'/>
<id>29c95cd98adfd9fa0aa71b4958d14b77b5a90e9d</id>
<content type='text'>
Don't emit signals while popping acd events. Otherwise, we can get
a crash:

    #0  0x000055c2bb094e3b in n_acd_pop_event (acd=0x0, eventp=eventp@entry=0x7ffd47de65b0) at shared/n-acd/src/n-acd.c:846
            node = &lt;optimized out&gt;
            t_node = &lt;optimized out&gt;
    #1  0x000055c2baff53be in acd_event (source=&lt;optimized out&gt;, condition=&lt;optimized out&gt;, data=0x55c2bc4a6cf0) at src/devices/nm-acd-manager.c:180
            self = 0x55c2bc4a6cf0
            priv = 0x55c2bc4a6d08
            __func__ = "acd_event"
            event = 0x55c2bc593af0
            info = 0x55c2bc4b76c0
            address_str = "\000\000\000\000\000\000\000\000\bd\373\272\302U\000"
            hwaddr_str = 0x0
            r = &lt;optimized out&gt;
    #2  0x00007eff336238f9 in g_main_context_dispatch (context=0x55c2bc41f480) at gmain.c:3146
            dispatch = 0x7eff336688a0 &lt;g_io_unix_dispatch&gt;
            prev_source = 0x0
            was_in_call = 0
            user_data = 0x55c2bc4a6cf0
            callback = 0x55c2baff5310 &lt;acd_event&gt;
            cb_funcs = 0x7eff338eb920 &lt;g_source_callback_funcs&gt;
            cb_data = 0x55c2bc558680
            need_destroy = &lt;optimized out&gt;
            source = 0x55c2bc58c160
            current = 0x55c2bc43dd10
            i = 0
    ...

While at it, don't return from the events N_ACD_EVENT_DEFENDED,
N_ACD_EVENT_CONFLICT, and &lt;default&gt;, but continue popping events.

Fixes: d9a4b59c18e36f2b577744b7fe6710d71161ca12
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't emit signals while popping acd events. Otherwise, we can get
a crash:

    #0  0x000055c2bb094e3b in n_acd_pop_event (acd=0x0, eventp=eventp@entry=0x7ffd47de65b0) at shared/n-acd/src/n-acd.c:846
            node = &lt;optimized out&gt;
            t_node = &lt;optimized out&gt;
    #1  0x000055c2baff53be in acd_event (source=&lt;optimized out&gt;, condition=&lt;optimized out&gt;, data=0x55c2bc4a6cf0) at src/devices/nm-acd-manager.c:180
            self = 0x55c2bc4a6cf0
            priv = 0x55c2bc4a6d08
            __func__ = "acd_event"
            event = 0x55c2bc593af0
            info = 0x55c2bc4b76c0
            address_str = "\000\000\000\000\000\000\000\000\bd\373\272\302U\000"
            hwaddr_str = 0x0
            r = &lt;optimized out&gt;
    #2  0x00007eff336238f9 in g_main_context_dispatch (context=0x55c2bc41f480) at gmain.c:3146
            dispatch = 0x7eff336688a0 &lt;g_io_unix_dispatch&gt;
            prev_source = 0x0
            was_in_call = 0
            user_data = 0x55c2bc4a6cf0
            callback = 0x55c2baff5310 &lt;acd_event&gt;
            cb_funcs = 0x7eff338eb920 &lt;g_source_callback_funcs&gt;
            cb_data = 0x55c2bc558680
            need_destroy = &lt;optimized out&gt;
            source = 0x55c2bc58c160
            current = 0x55c2bc43dd10
            i = 0
    ...

While at it, don't return from the events N_ACD_EVENT_DEFENDED,
N_ACD_EVENT_CONFLICT, and &lt;default&gt;, but continue popping events.

Fixes: d9a4b59c18e36f2b577744b7fe6710d71161ca12
</pre>
</div>
</content>
</entry>
</feed>
