Envoy NACKs on a valid IPv6 address
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 430
Description
**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.
```json
{
"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)
```
Contributor guide
Assessment
This issue has not been assessed yet.