From 5bcc932168f262e2738684b159c680bb295271c5 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 21 Feb 2013 16:10:28 +0100 Subject: [PATCH] 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. --- sys/src/9/port/netif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/9/port/netif.c b/sys/src/9/port/netif.c index 3d77f0500..e775fe847 100644 --- a/sys/src/9/port/netif.c +++ b/sys/src/9/port/netif.c @@ -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;