Skip to content

ICMP requests are denied when L3-L4 policy is loaded #2571

@aanm

Description

@aanm
  1. Start cilium and cilium network
  2. Create 2 containers
    2.1. docker run -dt --net=cilium-net --name server -l app=backend httpd
    2.2. docker run -dt --net=cilium-net --name client -l app=frontend tgraf/netperf
  3. delete policy cilium policy delete --all
  4. import policy [0]
  5. clean ct sudo cilium bpf ct flush global
  6. open cilium monitor
  7. try to ping to server container docker exec -i client bash -c "ping -c4 10.1.161.37"
  8. pings don't work

output of cilium monitor is:

<- endpoint 44479, identity 642: 10.1.193.166 -> 10.1.161.37 EchoRequest
xx drop (Policy denied (L3)), to endpoint 15532, identity 642->643: 10.1.193.166 -> 10.1.161.37 EchoRequest

[0]

[
  {
    "endpointSelector": {
      "matchLabels": {
        "any:app": "backend"
      }
    },
    "ingress": [
      {
        "fromEndpoints": [
          {
            "matchLabels": {
              "any:app": "frontend"
            }
          }
        ],
        "toPorts": [
          {
            "ports": [
              {
                "port": "80",
                "protocol": "TCP"
              }
            ]
          }
        ]
      }
    ],
    "labels": [
      {
        "key": "name",
        "value": "allow-frontend-ingress-l3-l4",
        "source": "unspec"
      }
    ]
  }
]

bpf policy list of the server container

$ sudo sudo cilium bpf policy list 15532 -n
IDENTITY   PORT/PROTO   ACTION    BYTES   PACKETS   
1          ANY          allowed   0       0         
642        80/TCP       allowed   0       0

Metadata

Metadata

Assignees

Labels

area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.kind/bugThis is a bug in the Cilium logic.priority/highThis is considered vital to an upcoming release.sig/policyImpacts whether traffic is allowed or denied based on user-defined policies.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions