Date: Wed, 8 Feb 2006 16:50:23 +0200 (EET) From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> To: "George V. Neville-Neil" <gnn@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet6 in6.c Message-ID: <20060208164330.M6453@atlantis.atlantis.dp.ua>
next in thread | raw e-mail | index | archive | help
Hello!
> Date: Wed, 8 Feb 2006 07:16:46 +0000 (UTC)
> From: "George V. Neville-Neil" <gnn@FreeBSD.org>
>
> gnn 2006-02-08 07:16:46 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/netinet6 in6.c
> Log:
> Fix for an inappropriate bzero of the ICMPv6 stats. The code was zero'ing
> the wrong structure member but setting the correct one.
Now we have the following code here:
bzero(&ifr->ifr_ifru.ifru_icmp6stat,
sizeof(ifr->ifr_ifru.ifru_icmp6stat));
ifr->ifr_ifru.ifru_icmp6stat =
*((struct in6_ifextra *)ifp->if_afdata[AF_INET6])->icmp6_ifstat;
I don't understand what's the point of bzero()'ing this object (struct
in6_ifextra, as I see) just before assignment? Doesn't the second statement
overwrite _all significant_ result of the first one?
Sincerely, Dmitry
--
Atlantis ISP, System Administrator
e-mail: dmitry@atlantis.dp.ua
nic-hdl: LYNX-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060208164330.M6453>
