qemu crashes if tun init fails
Attached patch solves the problem.
Signature · 2 lines
J. Mayer <[email protected]> Never organized
Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.61
vl.c +3 -0
@@ -913,6 +926,9 @@ static int net_tun_init(NetDriverState *char *args[3 ];char **parg; +/* Avoid crash if no tun device init fails */ + nd->send_packet = dummy_send_packet; + nd->add_read_packet = dummy_add_read_packet; nd->fd =tun_open (nd->ifname,sizeof (nd->ifname));if (nd->fd <0 )return -1 ;