Add an example of a novel technique to the IPv6 code. This technique seems
to have been developed after the IPv6 code was written, it's called "checking for error returns". Now netstat at least doesnt't go beserk in jails.
This commit is contained in:
parent
104bc06e0a
commit
dabce43c5b
@ -348,7 +348,8 @@ ip6_stats(off, name)
|
||||
if (off == 0)
|
||||
return;
|
||||
|
||||
kread(off, (char *)&ip6stat, sizeof (ip6stat));
|
||||
if (kread(off, (char *)&ip6stat, sizeof (ip6stat)))
|
||||
return;
|
||||
printf("%s:\n", name);
|
||||
|
||||
#define p(f, m) if (ip6stat.f || sflag <= 1) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user