From 14f0ae7db9b6c72ffe1037ad6cfe6497e149ff44 Mon Sep 17 00:00:00 2001 From: Raul Gutierrez Segales Date: Mon, 11 Jan 2021 11:54:35 -0500 Subject: [PATCH 1/2] filter manager: drop assert This allows us to do a dynamic_cast and be able to call setDownstreamRemoteAddress() from our filter. See: https://github.com/envoyproxy/envoy/pull/14432#issuecomment-758004199 Signed-off-by: Raul Gutierrez Segales --- source/common/http/filter_manager.h | 1 - 1 file changed, 1 deletion(-) diff --git a/source/common/http/filter_manager.h b/source/common/http/filter_manager.h index a7b1329bb78f1..f2873ff9a1c0f 100644 --- a/source/common/http/filter_manager.h +++ b/source/common/http/filter_manager.h @@ -611,7 +611,6 @@ class OverridableRemoteSocketAddressSetterStreamInfo : public StreamInfo::Stream void setDownstreamRemoteAddress( const Network::Address::InstanceConstSharedPtr& downstream_remote_address) { - ASSERT(overridden_downstream_remote_address_ == nullptr); overridden_downstream_remote_address_ = downstream_remote_address; } From 85bb14311db194c975043b2d3901b60ee0f2161b Mon Sep 17 00:00:00 2001 From: Raul Gutierrez Segales Date: Mon, 11 Jan 2021 14:26:51 -0500 Subject: [PATCH 2/2] Add TODO comment Signed-off-by: Raul Gutierrez Segales --- source/common/http/filter_manager.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/common/http/filter_manager.h b/source/common/http/filter_manager.h index f2873ff9a1c0f..65061c9113c2f 100644 --- a/source/common/http/filter_manager.h +++ b/source/common/http/filter_manager.h @@ -611,6 +611,10 @@ class OverridableRemoteSocketAddressSetterStreamInfo : public StreamInfo::Stream void setDownstreamRemoteAddress( const Network::Address::InstanceConstSharedPtr& downstream_remote_address) { + // TODO(rgs1): we should assert overridden_downstream_remote_address_ is nullptr, + // but we are currently relaxing this as a workaround to: + // + // https://github.com/envoyproxy/envoy/pull/14432#issuecomment-758167614 overridden_downstream_remote_address_ = downstream_remote_address; }