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.
This commit is contained in:
cinap_lenrek 2013-02-21 16:10:28 +01:00
parent 00ba1aac9e
commit 5bcc932168

View file

@ -67,7 +67,7 @@ netifgen(Chan *c, char*, Dirtab *vp, int, int i, Dir *dp)
/* 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;