mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 13:32:45 +00:00
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
fe997d964c
commit
6eec3af9fe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74453
@ -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…
Reference in New Issue
Block a user