mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
dhcp6: do not append ORO option when no option requested
Fixes #24292. (cherry picked from commit 4c275f362fa11888682dfbf6ec7c8cfd6127597f)
This commit is contained in:
parent
97474b03e7
commit
c966377c51
@ -683,6 +683,9 @@ static int client_append_oro(sd_dhcp6_client *client, uint8_t **opt, size_t *opt
|
||||
req_opts = client->req_opts;
|
||||
}
|
||||
|
||||
if (n == 0)
|
||||
return 0;
|
||||
|
||||
return dhcp6_option_append(opt, optlen, SD_DHCP6_OPTION_ORO, n * sizeof(be16_t), req_opts);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user