<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:微软雅黑
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br><br>The problem is about the configuration of TUN/TAP. In my project, I have finished my script and successfully create tap0 and tap1. However, when I run my project in bochs(a emulator), it prompt a message "*** buffer overflow detected ***: bochs terminated" , which should be "tuntap network driver: opened /dev/net/tun:tap0 device" while the status of TUN/TAP is normal.<br><br>I tried to find out what happened, but failed. Detail as blow:<br><br>1)I tried ”cat /dev/net/tun“ and its feedback is ”cat: /dev/net/tun: File descriptor in bad state“<br><br>2)I tried "lsmod | grep tun". No information output.<br><br>3)I tried "modprobe tun". And then tried "lsmod | grep tun" again. The result is the same : No information output.<br><br>4)I check tap0, tap1 by the command of ifconfig. The information is blow(tap0 and tap1 is not RUNNING):<br><br>=============================================================================<br>lo        Link encap:本地环回  <br>          inet 地址:127.0.0.1  掩码:255.0.0.0<br>          inet6 地址: ::1/128 Scope:Host<br>          UP LOOPBACK <font style="font-size: 20pt;" color="#5133AB" size="5"><b><font style="">RUNNING</font></b></font>  MTU:16436  跃点数:1<br>          接收数据包:1496 错误:0 丢弃:0 过载:0 帧数:0<br>          发送数据包:1496 错误:0 丢弃:0 过载:0 载波:0<br>          碰撞:0 发送队列长度:0<br>          接收字节:171417 (171.4 KB)  发送字节:171417 (171.4 KB)<br><br>tap0      Link encap:以太网  硬件地址 mac1<br>          inet 地址:ip1    掩码:255.255.255.0<br>          UP BROADCAST PROMISC MULTICAST  MTU:1500  跃点数:1<br>          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0<br>          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0<br>          碰撞:0 发送队列长度:500<br>          接收字节:0 (0.0 B)  发送字节:0 (0.0 B)<br><br>tap1      Link encap:以太网  硬件地址 mac2<br>          inet 地址:ip2   掩码:255.255.255.0<br>          UP BROADCAST PROMISC MULTICAST  MTU:1500  跃点数:1<br>          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0<br>          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0<br>          碰撞:0 发送队列长度:500<br>          接收字节:0 (0.0 B)  发送字节:0 (0.0 B)<br>===============================================================================<br><br>Since the system can perform on another machine normally, the code of the project is ok. I think that maybe the TUN/TAP is not installed/configured correctly. Isn't it? <br><br>Furthermore, some information of my project is blow:<br>1) OS : ubuntu12.04(newly install ubuntu12.04, not upgrade from a lower version)<br>2) have installed brctl and tunctl(sudo apt-get install uml-utilities bridge-util)<br>3) the version of boche is 2.5.1(--enable-pci --enable-ne2000 --enable-pnic)<br>4) the configuration of tuntap in the script of boche is :<br><br>   ne2k: enabled=1, ioaddr=0x300, irq=11, mac=11:22:33:44:55:66, ethmod=tuntap, ethdev=/dev/net/tun:tap0<br>   pci: enabled=1, chipset=i440fx<br>   i440fxsupport: enabled=1, slot1=ne2k <br><br>Finally, is all my configuration above correct? If yes, does that means some bugs within TUN/TAP?<br>                                    </div></body>
</html>