Skip to content

tsi: forward protocol field in proxy create enabling DGRAM+ICMP ping#127

Draft
mtjhrc wants to merge 1 commit into
containers:mainfrom
mtjhrc:tsi-icmp-ping
Draft

tsi: forward protocol field in proxy create enabling DGRAM+ICMP ping#127
mtjhrc wants to merge 1 commit into
containers:mainfrom
mtjhrc:tsi-icmp-ping

Conversation

@mtjhrc
Copy link
Copy Markdown
Contributor

@mtjhrc mtjhrc commented May 21, 2026

Add protocol to struct tsi_proxy_create and struct tsi_sock so the host VMM can distinguish SOCK_DGRAM+IPPROTO_ICMP ("ping" socket) from plain UDP. Without this, TSI hijacks ping sockets but the host creates UDP sockets, breaking ICMP echo.

This enables ping for implementations that use SOCK_DGRAM ping sockets (iputils on modern Fedora, Ubuntu, etc.). SOCK_RAW-based ping (busybox/alpine) is not supported as TSI only hijacks SOCK_STREAM and SOCK_DGRAM.

Coresponding libkrun side fix + test: TODO

Assisted-by: OpenCode:claude-opus-4.6

Add protocol to struct tsi_proxy_create and struct tsi_sock so the
host VMM can distinguish SOCK_DGRAM+IPPROTO_ICMP ("ping" socket) from
plain UDP. Without this, TSI hijacks ping sockets but the host
creates UDP sockets, breaking ICMP echo.

This enables ping for implementations that use SOCK_DGRAM ping
sockets (iputils on modern Fedora, Ubuntu, etc.). SOCK_RAW-based ping
(busybox/alpine) is not supported as TSI only hijacks SOCK_STREAM
and SOCK_DGRAM.

Assisted-by: OpenCode:claude-opus-4.6
Signed-off-by: Matej Hrica <mhrica@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant