envoyproxy/envoy

Envoy NACKs on a valid IPv6 address

Open

#29.902 aperta il 2 ott 2023

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)C++ (5373 fork)batch import
bughelp wantedinvestigate

Metriche repository

Star
 (27.997 star)
Metriche merge PR
 (Merge medio 8g) (378 PR mergiate in 30 g)

Descrizione

Description:

We ran into this issue that seems definitely unusual. I have considered if this is caused due to underlying host not supporting IPv6 or working in AWS bridge mode but not able to reproducible locally.

A NACK thrown in Envoy version v1.27.

failureReason:Error adding/updating listener(s) egress: malformed IP address: 2600:f0f0:0:0:0:0:0:1

As per NACK Envoy couldn't validate that this is a proper IPv6 address which was provided in filter chain match like

         "filter_chain_match": {
          "prefix_ranges": [
           {
            "address_prefix": "127.255.0.1",
            "prefix_len": 32
           },
           {
            "address_prefix": "2600:f0f0:0:0:0:0:0:1",
            "prefix_len": 128
           }
          ],

I believe the IPv6 address validation is done in https://github.com/envoyproxy/envoy/blob/83e604abd8214f379617e6320d2255ea20ca0e1f/source/common/network/utility.cc#L117

Repro steps: Not able to reproduce as this was noted on customer's environment.

Config: Same as the one mentioned above.

{
     "name": "egress",
     "active_state": {
      "version_info": "1",
      "listener": {
       "@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
       "name": "egress",
       "address": {
        "socket_address": {
         "address": "127.0.0.1",
         "port_value": 59632
        }
       },
       "filter_chains": [
        {
         "filter_chain_match": {
          "prefix_ranges": [
           {
            "address_prefix": "127.255.0.1",
            "prefix_len": 32
           },
           {
            "address_prefix": "2600:f0f0:0:0:0:0:0:1",
            "prefix_len": 128
           }
          ],
          "destination_port": 8156
         },
         "filters": [
         ....

Logs:

Logs on Control Plane

26 09 2023 20:20:50,731 [WARN] envoy.common.EnvoyNackHandler: Received NACK(failureReason:Error adding/updating listener(s) egress: malformed IP address: 2600:f0f0:0:0:0:0:0:1) for resource(type:MetaType(identity=envoy.listener), version:, nonce:488d0f4a-425a-467c-99ac-1ddd0a0e9543, names:[]) from Envoy(version:v1.27.0.0)

Guida contributor