diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-14 02:43:51 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-08-14 02:44:52 +0900 |
commit | 4c275f362fa11888682dfbf6ec7c8cfd6127597f (patch) | |
tree | ce5fed0f1ea03b15ea6cacc92db8871154c9b69c /src/libsystemd-network | |
parent | 1929c1fcb2f305206c01a6fc79cd038d6d9615f5 (diff) | |
download | systemd-4c275f362fa11888682dfbf6ec7c8cfd6127597f.tar.gz |
dhcp6: do not append ORO option when no option requested
Fixes #24292.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 0727050ed2..2611490067 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -690,6 +690,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); } |