dhcp6: fix wrong length for IA_PD dhcp6 option
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Mar 2021 15:23:51 +0000 (00:23 +0900)
committerLennart Poettering <lennart@poettering.net>
Tue, 16 Mar 2021 20:29:49 +0000 (21:29 +0100)
commitfa92d38428cdac260e72e280bf1d43539f4ea805
treec9a4017905be6f7c8be35d6ebae8d56a6b53a646
parent69bedd07c3ba5061c1929c15227660e77293ffdb
dhcp6: fix wrong length for IA_PD dhcp6 option

Fixes an issue introduced by 73b49d433c2c8e6304c8b82538bd4231d070fce4.

When PrefixDelegationHint= is not set, dhcp6_option_append_pd() sets
wrong length for IA_PD option, as `r` is `-EINVAL`.

Fixes #19021.
src/libsystemd-network/dhcp6-option.c