diff options
Diffstat (limited to 'usr.bin/netstat/netgraph.c')
-rw-r--r-- | usr.bin/netstat/netgraph.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c index 77db23f..8ca9e5c 100644 --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -62,7 +62,8 @@ static int first = 1; static int csock = -1; void -netgraphprotopr(u_long off, const char *name, int af1 __unused) +netgraphprotopr(u_long off, const char *name, int af1 __unused, + int proto __unused) { struct ngpcb *this, *next; struct ngpcb ngpcb; @@ -81,6 +82,10 @@ netgraphprotopr(u_long off, const char *name, int af1 __unused) struct kld_file_stat ks; int fileid; + /* Can't do this for core dumps. */ + if (!live) + return; + /* See if module is loaded */ if ((fileid = kldfind(modname)) < 0) { if (debug) |