Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Nov 2009 10:55:42 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        antoine@FreeBSD.org
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, delphij@FreeBSD.org
Subject:   Re: svn commit: r199201 - in head: contrib/libpcap sbin/ifconfig share/man/man4 sys/kern sys/net sys/sys
Message-ID:  <20091112.105542.643508160.imp@bsdimp.com>
In-Reply-To: <f19c444a0911112248n21e571f6i5aa3c4e1e383087@mail.gmail.com>
References:  <200911112130.nABLUw9b007768@svn.freebsd.org> <f19c444a0911112248n21e571f6i5aa3c4e1e383087@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

In message: <f19c444a0911112248n21e571f6i5aa3c4e1e383087@mail.gmail.com>
            Antoine Brodin <antoine@FreeBSD.org> writes:
: On Wed, Nov 11, 2009 at 10:30 PM, Xin LI <delphij@freebsd.org> wrote:
: > Author: delphij
: > Date: Wed Nov 11 21:30:58 2009
: > New Revision: 199201
: > URL: http://svn.freebsd.org/changeset/base/199201
: >
: > Log:
: >  Add interface description capability as inspired by OpenBSD.
: >
: >  MFC after:    3 months
: >
: > Modified:
: >  head/contrib/libpcap/inet.c
: >  head/sbin/ifconfig/ifconfig.8
: >  head/sbin/ifconfig/ifconfig.c
: >  head/share/man/man4/netintro.4
: >  head/sys/kern/kern_jail.c
: >  head/sys/net/if.c
: >  head/sys/net/if.h
: >  head/sys/net/if_var.h
: >  head/sys/sys/param.h
: >  head/sys/sys/priv.h
: >  head/sys/sys/sockio.h
: ...
: > Modified: head/sys/net/if_var.h
: > ==============================================================================
: > --- head/sys/net/if_var.h       Wed Nov 11 21:18:27 2009        (r199200)
: > +++ head/sys/net/if_var.h       Wed Nov 11 21:30:58 2009        (r199201)
: > @@ -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];
: >  };
: 
: Hi Delphij,
: 
: Doesn't this break ABI gratuitously?  (I think it changes the size of
: struct ifnet)

In head this is OK (it doean't break the size).  In -stable, it should
instead look like:

       char     if_cspare[3];
-       void    *if_pspare[8];
+       void    *if_pspare[7];
+       struct sbuf *if_description;

of course, in -head it could look that way too and not force a
recompile of everything that groks ifnets...

Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091112.105542.643508160.imp>