diff options
author | 2020-06-03 14:47:06 +0000 | |
---|---|---|
committer | 2020-06-03 14:47:06 +0000 | |
commit | 8340427544b3adedd57736fb13ca69c5549b6fc1 (patch) | |
tree | d59244deda4ebe464cd5e849bdbf6316bb70ae67 /apps/http-proxy/src/forwarder_config.h | |
parent | 58ab29c559fa1801545c500af60b00b74f704bd3 (diff) | |
parent | 15458966a342caa0912b7806a755d0d8277ca00f (diff) |
Merge "[HICN-610] Override hicn prefix used by http-proxy with one received from configuration."
Diffstat (limited to 'apps/http-proxy/src/forwarder_config.h')
-rw-r--r-- | apps/http-proxy/src/forwarder_config.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/http-proxy/src/forwarder_config.h b/apps/http-proxy/src/forwarder_config.h index 96f275c9f..3d69c998e 100644 --- a/apps/http-proxy/src/forwarder_config.h +++ b/apps/http-proxy/src/forwarder_config.h @@ -157,17 +157,19 @@ class ForwarderConfig { auto& it = results; while (it != end) { #else - for (auto it = results.begin(); it != results.end(); - it++) { + for (auto it = results.begin(); it != results.end(); it++) { #endif if (it->endpoint().address().is_v4()) { // Use this v4 address to configure the forwarder. ret->remote_addr = it->endpoint().address().to_string(); ret->family = AF_INET; + std::string _prefix = ret->route_addr; forwarder_interface_.createFaceAndRoute( - RouteInfoPtr(ret), - [callback = std::forward<Callback>(callback)]( - uint32_t route_id, bool result) { callback(result); }); + RouteInfoPtr(ret), [callback = std::forward<Callback>(callback), + configured_prefix = std::move(_prefix)]( + uint32_t route_id, bool result) { + callback(result, configured_prefix); + }); return true; } |