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:
parent
00ba1aac9e
commit
5bcc932168
|
@ -67,7 +67,7 @@ netifgen(Chan *c, char*, Dirtab *vp, int, int i, Dir *dp)
|
||||||
|
|
||||||
/* second level contains clone plus all the conversations */
|
/* second level contains clone plus all the conversations */
|
||||||
t = NETTYPE(c->qid.path);
|
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) {
|
switch(i) {
|
||||||
case DEVDOTDOT:
|
case DEVDOTDOT:
|
||||||
q.type = QTDIR;
|
q.type = QTDIR;
|
||||||
|
|
Loading…
Reference in a new issue