mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue