tl;dr: The latest Envoy release contains a regression related to how IP detection works when xff_num_trusted_hops > 0 and use_remote_address is true. To avoid it, do not use the new original_ip_detection_extensions field. Instead, keep using the xff_num_trusted_hops deprecated field until the next release or the corresponding fix becomes available.
After support for IP detection extensions was added , the xff_num_trusted_hops  field was deprecated in favor of the equivalent extension. Using the XFF extension  along with the use_remote_address option  will break detection because the detection code still relies on the deprecated field as opposed to using the field in the extension itself. More specifically, the configured value in the extension for xff_num_trusted_hops – when it’s greater than zero – is ignored when used in conjunction with use_remote_address. This means that you will end up with the remote address as the final address as opposed to it being extracted from the x-forwarded-for header. To fix this we will retire the deprecation around the xff_num_trusted_hops field, as well as preventing it and use_remote_address from being used with extensions given that this yields undefined behavior.
We’d like to thank Kateryna Nezdolii for reporting the issue and helping us debug it.
The Envoy Team