ref: 210e5897167126aaca183d8c34e2a263d0a229a5
parent: aca2a9b9dce7fc3c14f318f12d52f2af48769533
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Thu Feb 21 11:10:28 EST 2013
netif: fix stat() on "stats" and "ifstats" files in network interface the kernel would go into endless loop when stating "stats" and "ifstats" files and the network interface having no connections, or otherwise return wrong stat info.
--- a/sys/src/9/port/netif.c
+++ b/sys/src/9/port/netif.c
@@ -67,7 +67,7 @@
/* second level contains clone plus all the conversations */
t = NETTYPE(c->qid.path);
- if(t == N2ndqid || t == Ncloneqid || t == Naddrqid){+ if(t == N2ndqid || t == Ncloneqid || t == Naddrqid || t == Nstatqid || t == Nifstatqid){ switch(i) {case DEVDOTDOT:
q.type = QTDIR;
--
⑨