Subject: [PATCH] qemu tap support broken on current 3.99.17
To: None <tech-pkg@netbsd.org>
From: Luciano R. Furtado <lrfurtado@yahoo.com.br>
List: tech-pkg
Date: 04/16/2006 16:18:01
qemu when started with -net tap is crashing on tap_open on
NetBSD-current, I had to apply the following patch to get it to work
alpine# diff --from-file /tmp/vl.c vl.c
50,51d49
< #include <net/if.h>
< #include <net/if_tap.h>
2054c2052
< struct ifreq ifinfo;
---
> struct stat s;
2062,2063c2060,2062
< ioctl(fd,TAPGIFNAME, &ifinfo);
< pstrcpy(ifname, ifname_size, ifinfo.ifr_name);
---
> fstat(fd, &s);
> dev = devname(s.st_rdev, S_IFCHR);
> pstrcpy(ifname, ifname_size, dev);
alpine#