Skip to content

[RFE] Enable CONFIG_INET_DIAG_DESTROY #1844

@adberger

Description

@adberger

Current situation

According to https://docs.cilium.io/en/stable/network/kubernetes/kubeproxy-free/#limitations the kernel configs CONFIG_INET_DIAG, CONFIG_INET_UDP_DIAG and CONFIG_INET_DIAG_DESTROY have to be enabled in order for socket-LB to work correctly.
In flatcar CONFIG_INET_DIAG & CONFIG_INET_UDP_DIAG are already enabled, but CONFIG_INET_DIAG_DESTROY is missing:

zgrep -E 'CONFIG_INET_DIAG|CONFIG_INET_UDP_DIAG|CONFIG_INET_DIAG_DESTROY' /proc/config.gz
CONFIG_INET_DIAG=m
CONFIG_INET_UDP_DIAG=m
# CONFIG_INET_DIAG_DESTROY is not set

https://docs.cilium.io/en/stable/network/kubernetes/kubeproxy-free/#limitations:

When socket-LB feature is enabled, pods sending (connected) UDP traffic to services can continue to send traffic to a service backend even after it’s deleted.
Cilium agent handles such scenarios by forcefully terminating application sockets that are connected to deleted backends, so that the applications can be load-balanced to active backends.
This functionality requires these kernel configs to be enabled: CONFIG_INET_DIAG, CONFIG_INET_UDP_DIAG and CONFIG_INET_DIAG_DESTROY. 

Impact

  • cilium works correctly when socket-LB is enabled (e.g. when using kubeProxyReplacement)
  • slightly bigger image?
  • slightly more attack surface?

Ideal future situation

CONFIG_INET_DIAG_DESTROY is available like CONFIG_INET_DIAG & CONFIG_INET_UDP_DIAG

Implementation options

No idea, but probably the same as the CONFIG_INET_DIAG & CONFIG_INET_UDP_DIAG?

Additional information

There is also an issue for Azure Linux, see: microsoft/azurelinux#14108.
So flatcar is not the only OS missing this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ⚒️ In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions