The nm_ip_address_dup() and nm_ip_route_dup() symbols were exposed in
libnm 1.32 and then backported to 1.30.8.
Export it also with version @libnm_1_30_8; this allows a program build
against libnm 1.30.8 to keep working with later versions of the library.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
It doesn't actually work inside the root-less container...
Well, it works as far as starting to activate, before it
fails. That is still somewhat useful. So have it there...
a0970f12f1f4 c-list: avoid comma-operator in conditionals
2ea502c5ee83 c-list: return self from c_list_init()
ca473417f7b3 build: use c99 instead of c11
99d8daf152fa ci: run on windows-2016
857a37cfc960 test/embed: split off GNU-extensions
c09e29697912 ci: run through MSVC
c3ba3dc82466 build: run test_embed only with gcc/clang
77c872dcc67d test/api: split of GNU tests
3ab849ea658e test/basic: test_extensions() -> test_gnu()
04fda9508c86 c-list: reorder iterators
58ab8fb29472 test: add c_list_entry_offset() to API tests
6d2fdc76de70 build: update AUTHORS
92b893fb3c4b c-list: remove trailing '\\' from macro definitions
c255c6a97a04 c-list: use size_t
b47da33dedf1 c-list: use uintptr_t for pointer arithmetic in c_list_entry()
9b798f50bbd0 c-list: require CList pointer for argument to c_list_entry() macro
42bbf43ab0af test: guard gcc'ism
942fcfd80862 c-list: make _c_list_entry_eval() part of the API
73a620259ca0 c-list: don't use elvis operator for c_list_entry() macro
da5e122bd698 test: drop unused argc/argv
f1eadf27377e test: verify c_list_entry() does not double-evaluate
git-subtree-dir: src/c-list
git-subtree-split: a0970f12f1f406a5578a5dedf3580cd682e55812
The subtree was moved from "shared/c-list" to "src/c-list". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/c-list
git commit -a -m 'dummy commit'
git subtree add --prefix src/c-list git@github.com:c-util/c-list.git 96455db9f04a6c9101a00957161551aea700b6aa --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/c-list git@github.com:c-util/c-list.git main --squash
The subtree was moved from "shared/c-rbtree" to "src/c-rbtree". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/c-rbtree
git commit -a -m 'dummy commit'
git subtree add --prefix src/c-rbtree git@github.com:c-util/c-rbtree.git 8aa7bd1828eedb19960f9eef98d15543ec9f34eb --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/c-rbtree git@github.com:c-util/c-rbtree.git main --squash
The subtree was moved from "shared/c-siphash" to "src/c-siphash". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/c-siphash
git commit -a -m 'dummy commit'
git subtree add --prefix src/c-siphash git@github.com:c-util/c-siphash.git eb87a9c4a5b0441ede073597253e1d0b7785e6be --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/c-siphash git@github.com:c-util/c-siphash.git main --squash
The subtree was moved from "shared/c-stdaux" to "src/c-stdaux". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/c-stdaux
git commit -a -m 'dummy commit'
git subtree add --prefix src/c-stdaux git@github.com:c-util/c-stdaux.git 346623b40eb8137cae7568a69ee42253ff098ff7 --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/c-stdaux git@github.com:c-util/c-stdaux.git main --squash
The subtree was moved from "shared/n-dhcp4" to "src/n-dhcp4". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/n-dhcp4
git commit -a -m 'dummy commit'
git subtree add --prefix src/n-dhcp4 git@github.com:nettools/n-dhcp4.git 281f431756e32b6a978a92e6c1a95478917a6720 --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/n-dhcp4 git@github.com:nettools/n-dhcp4.git master --squash
The subtree was moved from "shared/n-acd" to "src/n-acd". That confuses
git-subtree. To fix it, reimport the code with
rm -rf src/n-acd
git commit -a -m 'dummy commit'
git subtree add --prefix src/n-acd git@github.com:nettools/n-acd.git a600afc870872bbdfc8081ca68d5665334cb9e6e --squash
Then rebase the result to drop the bogus dummy commit from the history.
To update the library use:
git subtree pull --prefix src/n-acd git@github.com:nettools/n-acd.git master --squash
"nm_assert(_self->priv.p->combined_l3cd_commited)" might fail during deactivate.
At that point the combined/commited config is NULL, but we still have zombies.
We often want to be pedantic about not accepting %NULL for getters (or ref,
unref, etc). Often that is also inconvenient, so we would need to write:
if (l3cd)
strv = nm_l3_config_data_get_nameservers(l3cd, addr_family, &len);
else
len = 0;
(and, make sure that strv does not trigger a maybe-uninitialized warning).
Being pedanic here is more cumbersome than helpful. Accept NULL to return
the sensible default.
Also add nm_l3_config_data_get_dns_priority_or_default() helper which maps
NULL or a missing value to zero. This is also only for convenience for certain
callers.
The plain nm_strv_equal(), nm_strv_equal_n(), nm_strv_cmp_n() functions
treat NULL strv arrays (without specified length) different than strv
arrays of length zero. They do so, because that is useful sometimes.
Sometimes it is not useful and we want to treat empty arrays the same
as a NULL array. Add helpers for that.
N_ACD_E_DROPPED is an error code of n-acd, albeit internal. But such codes are returned
as postive values, unlike error codes from errno.h (which are negative).
Fix comparing for N_ACD_E_DROPPED, otherwise the error gets propagate to the caller
when we should handle it internally.
The idea was that NMIPConfig would register itself with the property (like "address-data")
and then NML3Cfg would emit the property changed notification.
However, we can already achive that via the regular notification, in particular
by listening to NM_L3_CONFIG_NOTIFY_TYPE_PLATFORM_CHANGE_ON_IDLE notification.
Also, NML3Cfg does not really understand the details when the property should
be emitted. For example, many routes not not exposed via "route-data" property,
and changes to those should not trigger a notification.
Drop the unused API.
With nm_l3cfg_get_combined_l3cd(), we can get the commited or
the combined (next) l3cd. The commits is easy, it's cached already.
However, the combined needs to be computed first, if there were any
changes. For that we call _l3cfg_update_combined_config(), which then
also calls nm_l3_config_data_merge().
But in non-commit mode, _l3cfg_update_combined_config() doesn't call
_l3_acd_data_add_all(), so in _l3_hook_add_obj_cb() the ACD data may
not be as expected. This can previously hit an assertion.
Seems we can get a DOWN event during unit tests. I don't really
understand why, but let's ignore it.
[...]
#4 0x000055e365777786 in _l3_acd_nacd_event (fd=<optimized out>, condition=<optimized out>, user_data=0x55e367566270) at src/core/platform/tests/test-common.c:2703
#5 0x00007f4399c224cf in g_main_dispatch (context=0x55e36755fce0) at ../glib/gmain.c:3337
#6 g_main_context_dispatch (context=0x55e36755fce0) at ../glib/gmain.c:4055
#7 0x00007f4399c764f8 in g_main_context_iterate.constprop.0 (context=context@entry=0x55e36755fce0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../glib/gmain.c:4131
#8 0x00007f4399c1fc03 in g_main_context_iteration (context=0x55e36755fce0, context@entry=0x0, may_block=may_block@entry=1) at ../glib/gmain.c:4196
#9 0x000055e365770719 in test_l3_ipv6ll (test_data=<optimized out>) at src/core/tests/test-l3cfg.c:1024
We have nm_l3cfg_commit(), however that is synchronous and triggers an
avalanche of side effects. So it should be avoided if a component is
not aware of the current circumstances in which it gets called (most of them).
The alternative is nm_l3cfg_commit_on_idle_schedule(), but previously
that only supported the auto type.
Two changes:
- add a commit_type parameter to nm_l3cfg_commit_on_idle_schedule().
This allows to explicitly select a type for the next commit.
Previously, if the caller wanted for example to trigger a reapply
once, they had to register a handle, trigger the commit and unregister
the handle again. This basically allows to specify an ad-hoc commit
type that is only used once.
- if an explicit commit type is requested, then still always combine
it with auto. That means, we always use the "maximum" of what is
requested and what is registered.