Ed Schouten <e...@80386.nl> writes:
> Xin LI <delp...@freebsd.org> writes:
> > @@ -198,6 +198,7 @@ struct ifnet {
> >     void    *if_pf_kif;
> >     void    *if_lagg;               /* lagg glue */
> >     u_char   if_alloctype;          /* if_type at time of allocation */
> > +   struct sbuf *if_description;    /* interface description */
> >  
> >     /*
> >      * Spare fields are added so that we can modify sensitive data
> > @@ -205,7 +206,7 @@ struct ifnet {
> >      * be used with care where binary compatibility is required.
> >      */
> >     char     if_cspare[3];
> > -   void    *if_pspare[8];
> > +   void    *if_pspare[7];
> >     int     if_ispare[4];
> So there used to be four chars in a row here (between if_description and
> if_cspare). Are you sure moving the pointer in between doesn't increase
> the structure size?

I can guarantee you that it does.  On i386, for instance, there are now
three bytes of implicit padding between if_alloctype and if_description,
and one more between if_cspare and if_pspare, so struct ifnet has grown
by four bytes.

We should have CASSERTs for sizeof(struct ifnet) and other structs we
really care about.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to