Yu Watanabe
61c0ef4ff3
network: make RADVPrefixDelegation enum bitfield
...
This should not change any behavior.
2020-07-29 05:09:42 +09:00
Yu Watanabe
ea121d8f25
network: update address infomation even if link is in failed or linger state
...
As the link may be reconfigured later. If we do not update the address
information, then its setup state or operstate may not be updated
correctly.
2020-07-29 02:05:05 +09:00
Yu Watanabe
e55265184b
network: do not assume static addresses are configured
...
link_request_set_routes() is also called when a dynamic address is
configured. At that time, static addresses may not be configured yet.
Fixes #16546 .
2020-07-29 02:05:05 +09:00
Yu Watanabe
15797d6a2b
network: check at least one dynamic address is assigned when DHCP is enabled
2020-07-29 02:05:05 +09:00
Yu Watanabe
1633c45731
network: dhcp6: drop addresses and delegated prefixes on client stop
...
Previously, we did not drop addresses and delegated prefixes when
DHCP6 client is stopped.
Fixes #15455 .
Fixes #13564 .
2020-07-29 02:05:05 +09:00
Yu Watanabe
1c09d84e42
network: rename ipv4ll_address -> ipv4ll_address_configured
2020-07-29 02:05:05 +09:00
Yu Watanabe
b0b9776656
network: ndisc: also remove old DNSSL or RDNSS records after an SLAAC address is ready
2020-07-29 02:05:05 +09:00
Yu Watanabe
69203fba70
network: ndisc: remove old addresses and routes after at least one SLAAC address becomes ready
...
Otherwise, the old addresses will exist in deperecated state.
2020-07-29 02:05:05 +09:00
Yu Watanabe
6e537f62d7
network: dhcp4: release old lease after the new address become ready
...
Previously, on DHCPv4 address renewal, the old address may be removed
while the new address is not ready yet.
This also simplifies the logic of removing address and routes.
2020-07-29 02:05:05 +09:00
Yu Watanabe
80b0e86084
network: make address/route_configure optionally return created Address/Route object
2020-07-29 02:05:05 +09:00
Yu Watanabe
8eec0b9da5
network: set key destructor in several hash_ops
2020-07-29 02:05:05 +09:00
Yu Watanabe
5f58af25e6
network: make link_check_ready() return earlier if the link is not in 'configuring' state
2020-07-29 02:05:05 +09:00
Yu Watanabe
3336e946da
network: ndisc: do not set configured flags when addresses or routes are not assigned yet
...
Just for safety.
2020-07-29 02:05:05 +09:00
Yu Watanabe
5d8c3ec1e9
network: make link enter failed state if address_update() failed
2020-07-29 02:05:05 +09:00
Yu Watanabe
97f000744f
network: introduce callback called when an address becomes ready
2020-07-29 02:05:00 +09:00
Yu Watanabe
c9d223e803
test-network: add tests for prefix routes
2020-07-29 01:50:54 +09:00
Yu Watanabe
3606ca659e
network: add debug log for configuring address
2020-07-29 01:50:54 +09:00
Daan De Meyer
31363bd564
firstboot: Check if the given shell exists
2020-07-28 09:58:24 +02:00
Michael Marley
97efde65d8
network: radv: Send RA on newly-added dynamic prefix
...
When a prefix is delegated to an interface that is already sending
RAs, send an RA immediately to inform clients of the new prefix.
This allows them to start using it immediately instead of waiting
up to nearly 10 minutes (depending on when the last timed RA was
sent). This type of situation might occur if, for example, an
outage of the WAN connection caused the addresses and prefixes to
be lost and later regained after service was restored. The
condition for the number of RAs sent being above 0 simultaneously
ensures that RADV is already running and that this code doesn't
send any RAs before the timed RAs have started when the interface
first comes up.
2020-07-27 05:28:33 +09:00
Christian Göttsche
c8f12abc73
Fix clang-11 issues
...
Tested with clang 11.0.0-++20200715043845+0e377e253c1-1~exp1 on Debian sid
../src/network/test-networkd-conf.c:104:56: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
test_config_parse_duid_rawdata_one(BYTES_0_128 + 2, 0, &(DUID){0, 128, BYTES_1_128});
~~~~~~~~~~~~^~~
../src/network/test-networkd-conf.c:104:56: note: use array indexing to silence this warning
test_config_parse_duid_rawdata_one(BYTES_0_128 + 2, 0, &(DUID){0, 128, BYTES_1_128});
^
& [ ]
1 warning generated.
../src/test/test-clock.c:52:17: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
ftruncate(fileno(f), 0);
^~~~~~~~~ ~~~~~~~~~~~~
1 warning generated.
(gdb) run
Starting program: systemd/build/test-alloc-util
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
x1: 0x7fffffffd2d0
x2: 0x7fffffffdac0
y: 0x7fffffffd2cc
z: 0x7fffffffd2c0
cleanup2(0x7fffffffd2cc)
cleanup3(0x7fffffffd2c0)
cleanup1(0x7fffffffdac0)
cleanup1(0x7fffffffd2d0)
*** buffer overflow detected ***: terminated
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt full
set = {__val = {0, 18446744073709551615, 0, 0, 0, 0, 140737348658240, 140737348659520, 0, 0, 0, 0, 0, 0, 0, 0}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x22ff0, sa_sigaction = 0x22ff0}, sa_mask = {__val = {140737349888603, 4217127, 4217127, 4217127, 4217127, 4217383, 0, 0, 0, 0, 143329, 143344, 140737351162752, 8959, 18446744073709551328, 4289072}},
sa_flags = -138460788, sa_restorer = 0xffffffffffffffff}
sigs = {__val = {32, 0 <repeats 15 times>}}
ap = {{gp_offset = 24, fp_offset = 0, overflow_arg_area = 0x7fffffffd280, reg_save_area = 0x7fffffffd210}}
fd = <optimized out>
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
No locals.
No locals.
No locals.
No locals.
No locals.
l = 0
No locals.
p1 = 0x405500 "\223Nd\n\351\301mA\214\262A\247\306b\276\317\327\353\346k\035\024\273{\276&!kλ\233\217\t\207\276\327\347\351\355\307R\276\063{\235w=\237E\357\277KL\245\374\245\066M\201+\333\064\272\332g>1<@"
p2 = <optimized out>
i = <optimized out>
No locals.
2020-07-26 11:32:06 +02:00
Piotr Drąg
116d6d2965
catalog: update Polish translation
2020-07-26 11:28:29 +02:00
Yu Watanabe
f527c6fa08
resolvectl: fix older resolved or networkd support to set DNS servers
...
Fixes #16573 .
2020-07-26 11:05:06 +02:00
Yu Watanabe
e128723dae
Merge pull request #16566 from poettering/nspawn-osrelease-fixes
...
nspawn: os-release reorganization, second try
2020-07-24 13:37:31 +09:00
Yu Watanabe
a8bd4bab75
Merge pull request #16567 from keszybz/more-news
...
NEWS and hwdb update for v246-rc2
2020-07-24 13:35:09 +09:00
Axel Rasmussen
199a892218
selinux: handle getcon_raw producing a NULL pointer, despite returning 0
...
Previously, we assumed that success meant we definitely got a valid
pointer. There is at least one edge case where this is not true (i.e.,
we can get both a 0 return value, and *also* a NULL pointer):
4246bb550d/libselinux/src/procattr.c (L175)
When this case occurrs, if we don't check the pointer we SIGSEGV in
early initialization.
2020-07-24 13:34:27 +09:00
Dan Streetman
d05f7b5007
semaphoreci: update Debian release to bullseye
...
The Debian upstream-ci branch is updating to require debhelper 13,
which is only currently available from bullseye, or buster-backports.
2020-07-24 01:45:44 +03:00
Lennart Poettering
38821a0e29
update TODO
2020-07-23 18:47:38 +02:00
Lennart Poettering
d64e32c245
nspawn: rework how /run/host/ is set up
...
Let's find the right os-release file on the host side, and only mount
the one that matters, i.e. /etc/os-release if it exists and
/usr/lib/os-release otherwise. Use the fixed path /run/host/os-release
for that.
Let's also mount /run/host as a bind mount on itself before we set up
/run/host, and let's mount it MS_RDONLY after we are done, so that it
remains immutable as a whole.
2020-07-23 18:47:38 +02:00
Luca Boccassi
62b0ee9eb1
portabled: update host's os-release path
2020-07-23 18:47:38 +02:00
Luca Boccassi
98aac2ad5a
doc: update os-release spec with new path for container host's file
2020-07-23 18:47:38 +02:00
Luca Boccassi
549719699c
NEWS: fix typo in path
2020-07-23 18:47:38 +02:00
Lennart Poettering
d130181fd8
nspawn: add missing spdx header
2020-07-23 18:47:38 +02:00
Lennart Poettering
e9769453e3
Merge pull request #16561 from yuwata/test-ordered-set
...
test: clarify that ordered_set_put() returns -EEXIST if entry is duplicated
2020-07-23 18:31:03 +02:00
Lennart Poettering
8047ac8fdc
core: clean more env vars from env block pid1 receives
...
We generally clean all env vars we use ourselves to communicate with out
childrens. We forgot some more recent additions however. Let's correct
that.
2020-07-23 18:30:15 +02:00
Zbigniew Jędrzejewski-Szmek
337f0b0094
NEWS: reorder entries a bit and add a few items
2020-07-23 17:53:39 +02:00
Zbigniew Jędrzejewski-Szmek
8b25484af3
NEWS: update contributors list for v246-pre
2020-07-23 17:30:54 +02:00
Zbigniew Jędrzejewski-Szmek
c015d657ec
hwdb: update again for v246
...
Just a few minor changes.
2020-07-23 17:25:40 +02:00
Lennart Poettering
b226422cd7
firstboot: don't create /etc/passwd with mode 000
...
It needs to be world readable (unlike /etc/shadow) when created anew.
This fixes systems that boot with "systemd-nspawn --volatile=yes", i.e.
come up with an entirely empty /etc/ and thus no existing /etc/passwd
file when firstboot runs.
2020-07-23 17:09:11 +02:00
Lennart Poettering
2a2e78e969
nspawn: fix MS_SHARED mount propagation for userns containers
...
We want our OS trees to be MS_SHARED by default, so that our service
namespacing logic can work correctly. Thus in nspawn we mount everything
MS_SHARED when organizing our tree. We do this early on, before changing
the user namespace (if that's requested). However CLONE_NEWUSER actually
resets MS_SHARED to MS_SLAVE for all mounts (so that less privileged
environments can't affect the more privileged ones). Hence, when
invoking it we have to reset things to MS_SHARED afterwards again. This
won't reestablish propagation, but it will make sure we get a new set of
mount peer groups everywhere that then are honoured for the mount
namespaces/propagated mounts set up inside the container further down.
2020-07-23 17:08:39 +02:00
szb512
fe224669fb
Update mkosi.ubuntu to 'focal'
...
[zjs: Looking at https://packages.ubuntu.com/bionic/iptables-dev , iptables-dev
was a transitional package that was pulling in libxtables-dev, libip4tc-dev,
and libip6tc-dev (as listed by @GiedriusS). iptables-dev is gone in focal, so
replace it by the expanded list.]
2020-07-23 16:44:09 +02:00
Yu Watanabe
6f5d73aba6
network: compare with peer address if it is specified
...
Follow-ups for dfef713f3e
.
2020-07-23 16:37:56 +02:00
Zbigniew Jędrzejewski-Szmek
01b92946c5
Merge pull request #16532 from yuwata/network-sync-state-file
...
network: sync link state file on dbus call, and ndisc cleanups
2020-07-23 16:34:38 +02:00
Zbigniew Jędrzejewski-Szmek
d4fa0493a7
test-ordered-set: add a case where we get 0 for duplicate entries
...
This API is a complete mess. We forgot to do a hashed comparison for duplicate
entries and we use a direct pointer comparison. For trivial_hash_ops the result
is the same. For all other case, it's not. Fixing this properly will require
auditing all the uses of set_put() and ordered_set_put(). For now, let's just
acknowledge the breakage.
2020-07-23 15:47:21 +02:00
Zbigniew Jędrzejewski-Szmek
5cf821acf8
man: do not say that isolate is like switching runlevels
...
We need to do better here, but for now let's at least not trick
users into nuking their graphical environment. Inspired by #16548 .
2020-07-23 15:30:35 +02:00
Zbigniew Jędrzejewski-Szmek
402e1e699f
Merge pull request #16557 from keszybz/two-ci-fixes
...
Two ci fixes
2020-07-23 15:24:46 +02:00
Yu Watanabe
2645d4bcc1
test: clarify that ordered_set_put() returns -EEXIST if entry is duplicated
2020-07-23 21:29:32 +09:00
Zbigniew Jędrzejewski-Szmek
0390b094f5
meson: do not choke on time epoch when there are no git tags
...
github ci was failing with:
meson.build:685:16: ERROR: String '' cannot be converted to int
2020-07-23 12:25:14 +02:00
Zbigniew Jędrzejewski-Szmek
960a64691f
semaphore: pull in tree explicitly
...
semaphoreci was failing with:
Can't exec "tree": No such file or directory at /tmp/autopkgtest-lxc.v9oand4g/downtmp/build.TIm/src/test/udev-test.pl line 1752.
https://semaphoreci.com/systemd/systemd/branches/pull-request-16551/builds/1
2020-07-23 12:25:14 +02:00
Lennart Poettering
495454f40f
update NEWS
2020-07-23 10:02:16 +02:00
Lennart Poettering
82ff544160
Merge pull request #16496 from DaanDeMeyer/firstboot-shell
...
firstboot: Add --root-shell option and tighten up passwd/shadow handling
2020-07-23 08:39:45 +02:00