Skip to content

Enable CONFIG_DUMMY#116

Open
mz-pdm wants to merge 1 commit intocontainers:mainfrom
mz-pdm:pdm-config-dummy
Open

Enable CONFIG_DUMMY#116
mz-pdm wants to merge 1 commit intocontainers:mainfrom
mz-pdm:pdm-config-dummy

Conversation

@mz-pdm
Copy link
Copy Markdown

@mz-pdm mz-pdm commented Apr 2, 2026

Some applications check for network availability by looking for a network device configured for Internet access. When TSI is used, there is no such device available by default, although Internet is accessible. Then those applications behave like when the connection is not available. See containers/libkrun#576.

Let's enable CONFIG_DUMMY to create a dummy network interface. Enabling the option means `dummy0' interface is created automatically in all VMs. It is down, i.e. unused, initially. libkrun can set it up if TSI is used, to make the applications happy while the device is still bypassed in favour of TSI. Proper handling of the device is libkrun's job, this commit just makes it available and present.

mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 2, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 2, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Some applications check for network availability by looking for a network device
configured for Internet access.  When TSI is used, there is no such device
available by default, although Internet is accessible.  Then those applications
behave like when the connection is not available.  See
containers/libkrun#576.

Let's enable CONFIG_DUMMY to create a dummy network interface.  Enabling the
option means `dummy0' interface is created automatically in all VMs.  It is
down, i.e. unused, initially.  libkrun can set it up if TSI is used, to make the
applications happy while the device is still bypassed in favour of TSI.  Proper
handling of the device is libkrun's job, this commit just makes it available and
present.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
@mz-pdm mz-pdm force-pushed the pdm-config-dummy branch from 4a1b6e2 to 2182021 Compare April 2, 2026 18:59
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 2, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 2, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 2, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 3, 2026
Some applications check for network availability by looking for a
network device configured for Internet access.  When TSI is used, there
is no such device available by default, although Internet is accessible.
Then those applications behave like when the connection is not
available.

Let's solve this problem by setting up a dummy network interface.  The
dummy interface is automatically created when CONFIG_DUMMY is enabled in
kernel or the corresponding kernel module is loaded.  This means a
sufficiently recent libkrunfw version is needed (see
containers/libkrunfw#116).  The dummy interface
is initially down.

In order to make the applications happy, the interface must be brought
up and set up for Internet connections.  This is ensured by setting the
IP address to 10.0.0.1/0 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  TSI availability is determined by
checking the presence of `tsi_hijack' in the kernel command line.

The dummy interface simply swallows all packets.  But it is effectively
bypassed by TSI for practical purposes.  Things like ICMP don't work in
either case.

When the kernel support is not available, the device is not present and
init.c cannot set it up.  We skip the configuration silently in such a
case, to not spam users with errors if they use older libkrunfw or
custom kernels.

Fixes: containers#576

Signed-off-by: Milan Zamazal <mzamazal@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