summaryrefslogtreecommitdiffstats
path: root/lib/pb-protocol/pb-protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pb-protocol/pb-protocol.c')
-rw-r--r--lib/pb-protocol/pb-protocol.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index 47d04a3..64bd161 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -305,6 +305,9 @@ int pb_protocol_config_len(const struct config *config)
for (i = 0; i < config->network.n_dns_servers; i++)
len += 4 + optional_strlen(config->network.dns_servers[i]);
+ len += 4 + optional_strlen(config->http_proxy);
+ len += 4 + optional_strlen(config->https_proxy);
+
len += 4;
for (i = 0; i < config->n_autoboot_opts; i++) {
if (config->autoboot_opts[i].boot_type == BOOT_DEVICE_TYPE)
@@ -550,6 +553,9 @@ int pb_protocol_serialise_config(const struct config *config,
config->network.dns_servers[i]);
}
+ pos += pb_protocol_serialise_string(pos, config->http_proxy);
+ pos += pb_protocol_serialise_string(pos, config->https_proxy);
+
*(uint32_t *)pos = __cpu_to_be32(config->n_autoboot_opts);
pos += 4;
for (i = 0; i < config->n_autoboot_opts; i++) {
@@ -1082,6 +1088,13 @@ int pb_protocol_deserialise_config(struct config *config,
config->network.dns_servers[i] = str;
}
+ if (read_string(config, &pos, &len, &str))
+ goto out;
+ config->http_proxy = str;
+ if (read_string(config, &pos, &len, &str))
+ goto out;
+ config->https_proxy = str;
+
if (read_u32(&pos, &len, &config->n_autoboot_opts))
goto out;
config->autoboot_opts = talloc_array(config, struct autoboot_option,
OpenPOWER on IntegriCloud