Package: golang-github-astroprofundis-sysinfo / 0.0~git20240112.ed54df1-2

Metadata

Package Version Patches format
golang-github-astroprofundis-sysinfo 0.0~git20240112.ed54df1-2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix debian buildd failures on nil network interface.patch | (download)

network.go | 11 8 + 3 - 0 !
1 file changed, 8 insertions(+), 3 deletions(-)

 handle nil interface from net.interfacebyname

This package built and all post-build Go tests passed fully on all local builds,
Salsa CI and on Launchpad on all architectures. However, on Debian buildd it
failed randomly, apparently as the `net.InterfaceByName` function returned a nil
interface if the specified network interface is not found or available,
manifesting as a `SIGSEGV` in the `getNetworkInfo` function. Seems that if an
error occurs (indicating `inet` is nil), the `ip_addrs` slice and `mtu` variable
are initialized to their zero values, preventing the subsequent nil pointer
dereference and ensuring the code handles unavailable interfaces gracefully.

Attempt to handle this error returned by `net.InterfaceByName` to avoid tests
failing.