bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45716: [PATCH 1/1] gnu: qemu: Fix ioclt(…, SIOCGIFCONF, …) for emul


From: Ludovic Courtès
Subject: bug#45716: [PATCH 1/1] gnu: qemu: Fix ioclt(…, SIOCGIFCONF, …) for emulated 64 bit architectures.
Date: Thu, 14 Jan 2021 14:39:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

Stefan <stefan-guix@vodafonemail.de> skribis:

> * gnu/packages/virtualization.scm (qemu): Add a snippet to fix a bug in the
> do_ioctl_ifconf() function of qemu to make ioclt(…, SIOCGIFCONF, …) work for
> emulated 64 bit architectures.
>
> The sizeof(struct ifreq) is 40 for 64 bit and 32 for 32 bit architectures.
> This structure contains a union of other structures, of which struct ifmap
> is the biggest for 64 bit architectures. Calling ioclt(…, SIOCGIFCONF, …)
> fills a struct sockaddr of that union, and do_ioctl_ifconf() only considered
> that struct sockaddr for the size of the union, which has the same size as
> struct ifmap on 32 bit architectures. So do_ioctl_ifconf() assumed a wrong
> size of 32 for struct ifreq instead of the correct size of 40 on 64 bit
> architectures.
>
> The fix makes do_ioctl_ifconf() handle struct ifmap as the biggest part of
> the union, treating struct ifreq with the correct size.
>
> This fixes (@ (guix build syscalls) network-interface-names) when used in
> emulated 64 bit architectures.

Applied, thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]