Skip to content

Enable CONFIG_DUMMY#116

Merged
slp merged 1 commit into
libkrun:mainfrom
mz-pdm:pdm-config-dummy
Apr 13, 2026
Merged

Enable CONFIG_DUMMY#116
slp merged 1 commit into
libkrun:mainfrom
mz-pdm:pdm-config-dummy

Conversation

@mz-pdm
Copy link
Copy Markdown
Contributor

@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
libkrun/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
libkrun/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
libkrun/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
libkrun/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
libkrun/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
libkrun/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>
@slp
Copy link
Copy Markdown
Collaborator

slp commented Apr 13, 2026

LGTM, thanks!

@slp slp merged commit f60c093 into libkrun:main Apr 13, 2026
6 checks passed
mz-pdm added a commit to mz-pdm/libkrun that referenced this pull request Apr 16, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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 16, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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 17, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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 17, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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 May 12, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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>
slp pushed a commit to containers/libkrun that referenced this pull request May 13, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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: #576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
slp pushed a commit to containers/libkrun that referenced this pull request May 20, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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: #576

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
(cherry picked from commit 2593acc)
Signed-off-by: Sergio Lopez <slp@redhat.com>
kvey pushed a commit to ThousandBirdsInc/thousandbirds-libkrun that referenced this pull request May 26, 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
libkrun/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/8 (an arbitrary choice without any special
reason) in init.c if TSI is enabled.  The netmask is selected to be
sane; it doesn't cover the whole IP range and we cannot set a default
route because then TSI has problems, but it's OK for the tested
application.  We can change it if some application has trouble with
that.

TSI availability is determined by checking the presence of `tsi_hijack'
in the kernel command line, before `--' delimiter if present.

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: #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.

2 participants