libos-nuse / net-next-nuse

Network Stack in Userspace
Other
287 stars 67 forks source link

invalid fd number return when open(2) is used. #11

Closed thehajime closed 9 years ago

thehajime commented 9 years ago

sudo NUSEDEV=eno16777736 nuse-eno16777736=192.168.209.39 ./nuse ../nginx-1.6.1/objs/nginx -c >pwd/../nginx-1.6.1/conf/nginx.conf -p ./

  • with tap

sudo NUSEDEV=eth1 NUSEVIF=TAP nuse-eth1=192.168.0.2 ./nuse nginx -c pwd/../nginx-1.6.1/conf/nginx.conf -p ./

both are closing socket for VIF, resulting no VIF channel after that (no RX/TX).

thehajime commented 9 years ago

(renamed the issue title)

https://github.com/thehajime/net-next-nuse/blob/nuse/arch/sim/nuse-glue.c#L431

int open (const char *pathname, int flags) { curfd++; return host_open (pathname, flags); }

this should NOT return a 'real' fd number, but pseudo fd num (curfd).

thehajime commented 9 years ago

b21e5a8 is more improved version of the fix to this issue.