linux-user: add SIOCADDRT/SIOCDELRT support

Enterprise / Virtualization / QEMU - Laurent Vivier [vivier.eu] - 5 July 2013 07:45 UTC

This allows to pass the device name.

You can test this with the "route" command.

WITHOUT this patch:

$ sudo route add -net default gw 10.0.3.1 eth0 SIOCADDRT: Bad address $ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Ifa 10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth

WITH this patch:

$ sudo route add -net default gw 10.0.3.1 eth0 $ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Ifa 0.0.0.0 10.0.3.1 0.0.0.0 UG 0 0 0 eth 10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth

7ff7b66 linux-user: add SIOCADDRT/SIOCDELRT support
linux-user/ioctls.h | 6 +++--
linux-user/syscall.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 2 deletions(-)

Upstream: git.qemu.org


  • Share