summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-dhcp6-lease.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* network: Restrict the valid charset of DNR namesRonan Pigott2024-10-291-0/+6
| | | | | | | | | Not all possible DNS names will survive serialization. Restrict the set of valid dns names to LDH encoded names. Fixes: 25c33e350042 (network: parse RFC9463 DHCPv4 DNR option, 2024-01-16) Fixes: a07e83cc58f6 (network: Parse RFC9463 DHCPv6 DNR option, 2024-01-17) Fixes: 0c90d1d2f243 (ndisc: Parse RFC9463 encrypted DNS (DNR) option, 2024-01-19)
* Merge pull request #34848 from ↵Lennart Poettering2024-10-221-29/+11
|\ | | | | | | | | yuwata/network-dhcpv6-do-not-request-ia-pd-on-info-req network/dhcp6: do not request IA_PD on information requesting mode
| * network/dhcp6: do not request IA_PD when running in the other-information modeYu Watanabe2024-10-211-29/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the following commits: - 180cc5421d9712fb95a6bbc725dc8ba459360c8b "sd-dhcp6-client: allow to request IA_PD on information requesting mode" - cf7a403e470368049165ecff7ac7686928778d7c "sd-dhcp6-lease: adjust information refresh time with lifetime of IA_PD" - 1918eda30d12e1ba3ee55921c18ec53267463e24 "network/dhcp6: process hostname and IA_PD on information requesting mode" As per discussion in #34299, https://github.com/systemd/systemd/issues/34299#issuecomment-2425153221 the offending commits violate RFC 8415 section 18.2.6: > The client uses an Information-request message to obtain > configuration information without having addresses and/or delegated > prefixes assigned to it.
* | Merge pull request #30952 from rpigott/resolved-dnrLennart Poettering2024-10-221-0/+103
|\ \ | |/ |/| RFC9463: Discovery of Network-designated Resolvers
| * network: add dnr resolvers to networkctl status json outputRonan Pigott2024-10-211-1/+1
| |
| * network: Parse RFC9463 DHCPv6 DNR optionRonan Pigott2024-10-211-0/+103
| | | | | | | | | | Implement the parsing for V6_DNR DHCPv6 option. This does the same as the DHCP V4_DNR option.
* | sd-dhcp6-lease: adjust information refresh time with lifetime of IA_PDYu Watanabe2024-10-151-6/+29
| | | | | | | | For the case when IRT is too large but lifetime of IA_PD is too short.
* | sd-dhcp6-client: allow to request IA_PD on information requesting modeYu Watanabe2024-10-151-5/+0
| | | | | | | | To support RFC 7084, WPD-4.
* | sd-dhcp6-lease: use free_and_replace_full()Yu Watanabe2024-10-151-4/+2
| |
* | tree-wide: use strv_extend_strv_consume() where appropriateMike Yuan2024-09-211-1/+1
|/
* dhcp: introduce sd_dhcp_duid and move relevant functions to sd_dhcp_duid.[ch]Yu Watanabe2023-12-221-1/+1
|
* dhcp: cleanup headers included by dhcp-identifier.hYu Watanabe2023-12-221-0/+1
|
* Rename {dual,triple}_timestamp_get to {dual,triple}_timestamp_nowZbigniew Jędrzejewski-Szmek2023-11-131-1/+1
| | | | | | Those functions take a pointer to a timestamp and return a timestamp pointer, so the reader would be justified to think that those are just getters. Rename them to avoid confusion.
* dhcp6: enterprise ID is 32bitYu Watanabe2023-11-011-1/+1
| | | | | | Follow-up for 6b44099b3baff64af1ef58db8e38ecddc8070e9b. Fixes #29800.
* networkd: Add DHCP vendor specific options to dbus APINandakumar Raghavan2023-10-271-0/+86
| | | | | | Add DHCP vendor specific options to expose in dbus API. This will be added to the JSON output when we query org.freedesktop.network1.Manager object.
* sd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friendsYu Watanabe2023-09-201-13/+40
|
* sd-dhcp6-client: use be32_sec_to_usec() at more placesYu Watanabe2023-09-201-15/+11
|
* sd-dhcp6-client: rework IA_NA or IA_PD gettersYu Watanabe2023-09-201-26/+109
| | | | | | | | | This splits sd_dhcp6_lease_get_address() into small pieces, and introduce FOREACH_DHCP6_ADDRESS() macro. Also, the lifetimes provided by _get_address_lifetime() are now in usec, and _get_address_lifetime_timestamp() provides timestamp. The same change is also applied for IA_PD.
* sd-dhcp6-client: introduce sd_dhcp6_lease_has_pd_prefix() and friendYu Watanabe2023-09-201-0/+8
| | | | No functional change, just refactoring.
* Merge pull request #28132 from rpigott/dhcp-captive-portalYu Watanabe2023-07-031-0/+35
|\ | | | | Implement RFC8910: captive portal dhcp options
| * dhcp6-client: parse RFC8910 captive portal dhcp6 optionRonan Pigott2023-06-301-0/+35
| |
* | sd-dhcp6-lease: ignore invalid byte(s) at the end of the packetPhilipp Kern2023-06-291-0/+5
|/ | | | | | | | | | | | | | Oracle Cloud sends malformed DHCPv6 replies that have an invalid byte at the end, which cannot be parsed as an option code. networkd currently can cope with the invalid option (it is ignored), but the whole packet is ignored altogether because of the additional null at the end. It's better to be liberal in what we accept and actually assign an address, given that the reply contains a valid IA_NA. Fixes #28183.
* sd-dhcp6: always append the default status message generated from status codeYu Watanabe2023-01-161-4/+2
| | | | Fixes #25988.
* all: avoid various "-Wcast-align=strict" warningsThomas Haller2022-12-091-1/+1
|
* dhcp6: gracefully handle NoBinding errorYu Watanabe2022-08-121-1/+1
| | | | | | | When we receive NoBinding status code, the requesting binding (address or any other information) does not exist anymore in the server. Hence, resending the request is meaningless. Let's restart the transaction from the beginning in that case.
* sd-dhcp6-client: add more debugging logs on parsing messageYu Watanabe2022-07-141-12/+22
|
* dhcp: make option names singularYu Watanabe2022-04-031-3/+3
|
* tree-wide: add a space after if, switch, for, and whileYu Watanabe2022-04-011-1/+1
|
* list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() saferYu Watanabe2022-03-191-1/+1
|
* list: declare iterator of LIST_FOREACH() in the loopYu Watanabe2022-03-191-3/+0
|
* sd-dhcp6-client: logs invalid NTP optionYu Watanabe2022-02-141-1/+1
| | | | | Returning negative errno triggers to produce debugging log in dhcp6_lease_parse_message().
* sd-dhcp6-client: split dhcp6-internal.h into twoYu Watanabe2022-02-141-2/+1
| | | | Also, this moves string tables to dhcp6-protocol.c.
* sd-dhcp6-client: add log about Information Refresh TimeYu Watanabe2022-02-141-3/+6
| | | | | And store IRT only when the client is running in information requesting mode.
* sd-dhcp6-client: use memcmp_nn() at one more placeYu Watanabe2022-02-141-5/+7
|
* sd-dhcp6-client: set lease expiration timer in client_enter_bound_state()Yu Watanabe2022-02-141-17/+10
| | | | | | The timer must be active until the client get re-enter bound state, and the timeout must be determined by the lease acquired when entering the bound state.
* sd-dhcp6-client: introduce dhcp6_lease_new_from_message()Yu Watanabe2022-02-141-1/+250
|
* sd-dhcp6-client: use structured initializerYu Watanabe2022-02-141-2/+4
|
* sd-dhcp6-lease: unify lease lifetime calculationYu Watanabe2022-02-141-19/+58
|
* sd-dhcp6-client: always use ENODATA when a lease does not have requested dataYu Watanabe2022-02-141-7/+7
|
* sd-dhcp6-client: introduce dhcp6_ia_free()Yu Watanabe2022-02-141-16/+17
|
* sd-dhcp6-client: unify IA option headerYu Watanabe2022-02-141-1/+1
| | | | This also fixes possible unaligned read of message.
* sd-dhcp6-lease: reset client or server ID when length is zeroYu Watanabe2022-02-141-12/+14
| | | | Addresses https://github.com/systemd/systemd/pull/22406#issuecomment-1029391091.
* sd-dhcp6-lease: convert assert_return() -> assert() in non-public functionsYu Watanabe2022-02-141-66/+63
|
* sd-dhcp6-client: rename ia -> ia_na, pd -> ia_pd in sd_dhcp6_leaseYu Watanabe2022-02-141-5/+5
| | | | The previous naming is quite misleading.
* dhcp6: make sd_dhcp6_lease_get_dns() and friends accepts NULLYu Watanabe2021-11-261-7/+9
|
* sd-dhcp6-client: introduce dhcp6_lease_{get,set}_clientid()Yu Watanabe2021-11-011-0/+32
|
* sd-dhcp6-client: prefix variables which store results with "ret_"Yu Watanabe2021-11-011-8/+8
|
* Merge pull request #21200 from yuwata/sd-dhcp6-client-server-addressYu Watanabe2021-11-011-0/+8
|\ | | | | sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()
| * sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()Yu Watanabe2021-11-011-0/+8
| |
* | sd-dhcp6: drop unused functionsYu Watanabe2021-11-011-18/+0
|/