Skip to content

IPv6 only setup using BPF not possible #4415

@florath

Description

@florath

I'm trying to setup an IPv6-only cluster using BPF - but it failed. (I have a IPv6-only setup using Iptables.)

Effect

Even if IPv4 is switched off, these logs appear:

2026-02-10 06:13:32.861 [INFO][9] startup/node.go 573: Cannot pick an IPv4 tunnel address from the given CIDR podCIDR="2a11:157:111:1039:77:223:11:0/112"
2026-02-10 06:13:32.868 [INFO][9] startup/startup.go 609: Initialize BGP data
2026-02-10 06:13:32.872 [WARNING][9] startup/autodetection_methods.go 99: Unable to auto-detect an IPv4 address: no valid IPv4 addresses found on the host interfaces
2026-02-10 06:13:32.872 [WARNING][9] startup/startup.go 632: Couldn't autodetect an IPv4 address. If auto-detecting, choose a different autodetection method. Otherwise provide an explicit address.
2026-02-10 06:13:32.872 [INFO][9] startup/startup.go 516: Clearing out-of-date IPv4 address from this node IP=""
2026-02-10 06:13:32.872 [INFO][9] startup/startup.go 520: Clearing out-of-date IPv6 address from this node IP=""
2026-02-10 06:13:32.879 [INFO][9] startup/node.go 573: Cannot pick an IPv4 tunnel address from the given CIDR podCIDR="2a11:157:111:1039:77:223:11:0/112"
2026-02-10 06:13:32.879 [WARNING][9] startup/utils.go 47: Terminating
Calico node failed to start

An attempt at analysis
For me there is a strange line in the code which sets needIPv4Autodetection unconditional to true when using BPF (core_controller.go; line 591).

needIPv4Autodetection := *instance.Spec.CalicoNetwork.LinuxDataplane == operatorv1.LinuxDataplaneBPF

Should this maybe read as:

needIPv4Autodetection := *instance.Spec.CalicoNetwork.LinuxDataplane == operatorv1.LinuxDataplaneBPF && hasIPv4Pools(instance)

IMHO the current implementation contradicts the validation logic. Please double-check. This is the first time I had a look at the source.

Versions:

  • Operator version: v1.40.3
  • Calico version: v3.31.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions