Date: Sun, 25 Jan 1998 11:40:01 -0800 (PST) From: Steve Price <sprice@hiwaay.net> To: freebsd-bugs Subject: Re: misc/1376 Message-ID: <199801251940.LAA09010@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/1376; it has been noted by GNATS. From: Steve Price <sprice@hiwaay.net> To: Bill Fenner <fenner@parc.xerox.com> Cc: risner@stdio.com, freebsd-gnats-submit@hub.freebsd.org Subject: Re: misc/1376 Date: Sun, 25 Jan 1998 13:40:09 -0600 Bill Fenner wrote: > > I don't think this is appropriate; as Gary said, the correct thing is > probably to bzero the if_data struct (e.g. why should ibytes get set to > zero but not imcasts, or iqdrops?). This is why I just applied it to -current. :) Would the attached patch make everyone happier? If not, your patches are always welcome. Steve > Bill Index: if_tun.c =================================================================== RCS file: /u/FreeBSD/cvs/src/sys/net/if_tun.c,v retrieving revision 1.41 diff -u -Lif_tun.c -r1.41 if_tun.c --- if_tun.c +++ if_tun.c 1998/01/25 19:22:27 @@ -125,16 +125,12 @@ ifp = &tunctl[i].tun_if; + memset(&ifp->if_data, 0, sizeof(ifp->if_data)); ifp->if_unit = i; ifp->if_name = "tun"; ifp->if_mtu = TUNMTU; ifp->if_ioctl = tunifioctl; ifp->if_output = tunoutput; ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST; ifp->if_snd.ifq_maxlen = ifqmaxlen; - ifp->if_collisions = 0; - ifp->if_ierrors = 0; - ifp->if_oerrors = 0; - ifp->if_ipackets = 0; - ifp->if_opackets = 0; if_attach(ifp); #if NBPFILTER > 0 bpfattach(ifp, DLT_NULL, sizeof(u_int));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801251940.LAA09010>