ref: 5bcc932168f262e2738684b159c680bb295271c5
parent: 00ba1aac9ed4df13a9880ad63a4291a953d53752
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;
--
⑨