Commit Graph
56200 Commits
Author SHA1 Message Date
Yu Watanabe 8ef959cd09 sd-dhcp6-client: initialize IO event source in sd_dhcp6_client_start() 2022-02-14 14:45:14 +09:00
Yu Watanabe f814cd80de sd-dhcp6-client: make state transition stricter 2022-02-14 14:45:14 +09:00
Yu Watanabe c2c878d806 sd-dhcp6-client: prohibit spurious state transition
Previously, `client_set_state(client, DHCP6_STATE_STOPPED)` might make
the client enter the SOLICIT state.
2022-02-14 14:45:14 +09:00
Yu Watanabe 220a88ca75 sd-dhcp6-client: disable T1 timer on T2
Otherwise, the client may be enter RENEW state after REBIND state.
2022-02-14 14:45:14 +09:00
Yu Watanabe c41bdb17fc sd-dhcp6-client: call client_notify() in client_enter_bound_state() 2022-02-14 14:45:14 +09:00
Yu Watanabe cdf3d8c584 sd-dhcp6-client: fix lifetime handling
This fixes the following issues:
- if T1 is finite and T2 is infinite, then the timer for T1 was not
  enabled,
- after T1 and T2 are randomized, T1 may be longer than T2.
2022-02-14 14:45:07 +09:00
Yu Watanabe 1d6cb4ce2a sd-dhcp6-client: use event_reset_time_relative() 2022-02-14 14:43:45 +09:00
Yu Watanabe 02354ee738 sd-dhcp6-client: introduce client_enter_bound_state()
To make client_set_state() smaller. This should not change any behavior.
2022-02-14 14:43:45 +09:00
Yu Watanabe cc5184823f sd-dhcp6-client: fix overflow in calculating timeout value 2022-02-14 14:43:45 +09:00
Yu Watanabe d0875a07dd sd-dhcp6-client: disable event source when client is stopped or freed 2022-02-14 14:43:45 +09:00
Yu Watanabe 7771233127 sd-dhcp6-client: use in6_addr_to_string() 2022-02-14 14:43:45 +09:00
Yu Watanabe 4db6334c9a sd-dhcp6-client: stop client on error in client state transition 2022-02-14 14:43:45 +09:00
Yu Watanabe bfa1139af4 sd-dhcp6-client: add missing one more error handling 2022-02-14 14:43:45 +09:00
Yu Watanabe 06d5e856f8 sd-dhcp6-client: rename client_start() -> client_set_state() 2022-02-14 14:43:45 +09:00
Yu Watanabe 07a3b3408b sd-dhcp6-client: introduce client_process_*()
This is mostly for shortening `client_receive_message()`.

This also fixes the following:
- do not trigger SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST notification
  when non-reply message,
- add several missing error handlings caused in client_start().
2022-02-14 14:43:45 +09:00
Yu Watanabe 0123b2dbac sd-dhcp6-client: fix possible unaligned read or write 2022-02-14 14:43:45 +09:00
Yu Watanabe 16347c15d8 sd-dhcp6-client: voidify client_reset() 2022-02-14 14:43:45 +09:00
Yu Watanabe 65ece4c85b sd-dhcp6-client: introduce dhcp6_lease_new_from_message() 2022-02-14 14:43:45 +09:00
Yu Watanabe c930925841 sd-dhcp6-client: use structured initializer 2022-02-14 14:43:45 +09:00
Yu Watanabe f4fbea7a0f sd-dhcp6-lease: unify lease lifetime calculation 2022-02-14 14:43:45 +09:00
Yu Watanabe 126277aceb sd-dhcp6-client: always use ENODATA when a lease does not have requested data 2022-02-14 14:43:45 +09:00
Yu Watanabe 29858a0f9e sd-dhcp6-client: unify dhcp6_option_append_{ia,pd}() 2022-02-14 14:43:45 +09:00
Yu Watanabe 877bfc78fd sd-dhcp6-client: store PD prefix hint in ia_pd
And allows to specify multiple hints.
2022-02-14 14:43:45 +09:00
Yu Watanabe e5b0b87f51 sd-dhcp6-client: introduce dhcp6_ia_free() 2022-02-14 14:43:45 +09:00
Yu Watanabe 4b0f27173c sd-dhcp6-client: unify IA option header
This also fixes possible unaligned read of message.
2022-02-14 14:43:45 +09:00
Yu Watanabe 93bd7c4192 sd-dhcp6-lease: reset client or server ID when length is zero
Addresses https://github.com/systemd/systemd/pull/22406#issuecomment-1029391091.
2022-02-14 14:43:45 +09:00
Yu Watanabe 049fddfa7d sd-dhcp6-lease: convert assert_return() -> assert() in non-public functions 2022-02-14 14:43:45 +09:00
Yu Watanabe 7c999d38fa sd-dhcp6-client: rename ia -> ia_na, pd -> ia_pd in sd_dhcp6_lease
The previous naming is quite misleading.
2022-02-14 14:43:45 +09:00
Yu Watanabe 43b7a412b1 sd-dhcp6-client: fix typo ia_pd -> ia_na
Fortunately, currently both ia_pd and ia_na in sd_dhcp6_client are
equivalent now.
2022-02-14 14:43:45 +09:00
Yu Watanabe 5e4d135c60 sd-dhcp6-client: introduce two helpers to create message 2022-02-14 14:43:45 +09:00
Yu Watanabe 6fcf356b9a sd-dhcp6-client: trigger assertion whn invalid IA type is provided
If the condition hits, then it is an error in coding, instead of a user
misconfiguration or invalid receivd message.
2022-02-14 14:40:57 +09:00
Yu Watanabe 8448321571 sd-dhcp6-client: add missing address existence check
This adds similar check as 58da18251f.
2022-02-10 21:50:02 +09:00
Yu Watanabe 2d88df457a Merge pull request #22471 from yuwata/network-bridge-vlan-protocol
network: bridge: fix vlan protocol
2022-02-10 20:40:04 +09:00
Yu Watanabe ac7e18be76 Merge pull request #22452 from yuwata/network-ipv6ll
network: use sysctl to set IPv6LL address generation mode when the interface is already up
2022-02-10 20:38:56 +09:00
Yu Watanabe b6d5dab7bb test-network: add missing tests for bridge properties 2022-02-10 18:04:34 +09:00
Yu Watanabe 6eb35be8e0 network: bridge: fix endian of vlan protocol
Fixes #22469.
2022-02-10 17:47:17 +09:00
Yu Watanabe 2becdbccd1 test-network: add testcase for re-generating IPv6LL address 2022-02-10 17:35:48 +09:00
Joerie de Gram 77d65e5659 network: attempt to trigger kernel IPv6LL address generation
Try to ensure kernel IPv6 link local address generation occurs by
setting the per-if addr_gen_mode sysctl when the link is already up,
instead of the netlink interface (IFLA_INET6_ADDR_GEN_MODE).

The netlink setting is sufficient in cases where the interface is not
yet up when networkd configures an interface - bringing the interface
up will trigger in-kernel address generation.

If the interface is already up, yet the interface has no IPv6LL assigned
setting IFLA_INET6_ADDR_GEN_MODE has no effect.

Writing the addr_gen_mode sysctl is a best effort attempt at triggering
address generation regardless of interface state because it also works
in cases where the interface is already up.

Fixes #22424.
2022-02-10 17:35:41 +09:00
Yu Watanabe 2b25f4eb23 network: move link_set_ipv6ll_stable_secret() to networkd-ipv6ll.c 2022-02-10 17:34:06 +09:00
Yu Watanabe 05b8fc498e network: skip to set IPv6LL address generation mode if the requested mode is already set 2022-02-10 17:34:06 +09:00
Yu Watanabe 6614116458 network: use log_link_warning_errno() or friends where applicable 2022-02-10 17:34:06 +09:00
Yu Watanabe 7d0d832d67 network: monitor current IPv6LL address generation mode 2022-02-10 17:34:06 +09:00
Yu Watanabe 80f2647dfb network: introduce two helper functions for setting IPv6LL address generation mode 2022-02-10 17:34:02 +09:00
Alvin Šipraga 19ff06b3a4 udev/net: support Match.Firmware= in .link files (#22462)
In cbcdcaaa0e ("Add support for conditions on the machines firmware")
a new Firmware= directive was added for .netdev and .network files.
While it was also documented to work on .link files, in actual fact the
support was missing. Add that one extra line to make it work, and also
update the fuzzer directives.
2022-02-10 16:19:28 +09:00
Anita Zhang 56eb88761e Merge pull request #22467 from mrc0mmand/TEST-64-lvm-static-autoactivation
test: lvm 2.03.15 dropped the static autoactivation
2022-02-09 17:10:06 -08:00
Frantisek Sumsal d10d562bd4 test: lvm 2.03.15 dropped the static autoactivation
so install the respective generator only if we're running with older
lvm versions.

See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
2022-02-09 22:36:25 +01:00
Federico Ceratto 68174bf051 Clarify protocol used in systemd-journal-upload (#22465)
* Clarify protocol used in systemd-journal-upload
2022-02-09 20:34:29 +00:00
Luca Boccassi 0b0ad494a0 Merge pull request #22458 from poettering/parse-safe-string
some safety tweaks to conf-parser.[ch]
2022-02-09 16:59:14 +00:00
Luca Boccassi 0628d48ec2 meson: disable export-dbus-interfaces target when cross-compiling
ERROR:
Cannot use target systemd as a generator because it is built for the
host machine and no exe wrapper is defined or needs_exe_wrapper is
true. You might want to set `native: true` instead to build it for
the build machine.
2022-02-09 14:31:44 +01:00
Evgeny Vereshchagin a5e6986ac0 ci: remove MULTI_STATUS from superlinter
Judging by
ERROR! Failed to call GitHub Status API!

it doesn't seem to work. Even if it did it would just clutter the status
checks I think so let's just remove MULTI_STATUS along with
GITHUB_TOKEN.
2022-02-09 13:04:06 +00:00