mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-12 09:17:44 +03:00
dhcp6: fix wrong length for IA_PD dhcp6 option
Fixes an issue introduced by 73b49d433c
.
When PrefixDelegationHint= is not set, dhcp6_option_append_pd() sets
wrong length for IA_PD option, as `r` is `-EINVAL`.
Fixes #19021.
This commit is contained in:
parent
69bedd07c3
commit
fa92d38428
@ -257,9 +257,9 @@ int dhcp6_option_append_pd(uint8_t **buf, size_t *buflen, const DHCP6IA *pd, con
|
|||||||
len += r;
|
len += r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hint_pd_prefix) {
|
if (hint_pd_prefix && hint_pd_prefix->iapdprefix.prefixlen > 0) {
|
||||||
r = option_append_pd_prefix(buf, buflen, hint_pd_prefix);
|
r = option_append_pd_prefix(buf, buflen, hint_pd_prefix);
|
||||||
if (r < 0 && r != -EINVAL)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
len += r;
|
len += r;
|
||||||
|
Loading…
Reference in New Issue
Block a user