Skip to content

Sidecar and host VRFs collide in shared maps #716

Closed

Description

@privateip

Summary

The galactic-vrf sidecar writes into the same pinned eBPF maps as galactic-cni. Two of those maps are keyed by numbers each network namespace hands out on its own: the egress route map by VRF table ID, and the attachment map by interface index.

Both namespaces start from the same values, so a sidecar VRF and a host tenant VRF on the same node can overwrite each other's entries, or be mistaken for each other during cleanup. This needs a tenant VPC attached to the edge node itself, which is rare while edge nodes are tainted.

Acceptance criteria

  • A sidecar VRF and a host tenant VRF with the same table ID on one node both route correctly
  • The same holds for a sidecar interface and a host interface with the same index

Activity

  1. added theissue type on Oct 4, 2026
  2. privateip commented on Oct 4, 2026

    @privateip
    CollaboratorAuthor

    Read at main ca0e47a. struct egress_route_key in internal/plumbing/ebpf/prog/usid.c (line 519) carries only table_id, family and prefix, and ifindex_vrf_table (line 758) is keyed by interface index. Both the host CNI and the sidecar allocate table IDs with findNextAvailableVRFID (internal/plumbing/vrf/vrf.go:284), each inside its own network namespace, starting from the same minimum. egressroutemap.SidecarOwnedTableIDs then classifies a table ID as sidecar-owned if any sidecar vrf_table row uses it, which would also capture a host table with the same number.

    A sidecar-only range for table IDs, or the writer's Block in the key, would separate the two populations.

  3. self-assigned this
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggalactic-gatewayRelated to galactic-gatewaygalactic-vrfRelated to galactic-vrf

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions