Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 2004 17:46:50 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src UPDATING src/sys/sys param.h src/sys/net if.c if.h
Message-ID:  <200408311746.50735.peter@wemm.org>
In-Reply-To: <20040831004311.GA29938@odin.ac.hmc.edu>
References:  <200408300629.i7U6TQ5C088279@repoman.freebsd.org> <200408301729.22348.peter@wemm.org> <20040831004311.GA29938@odin.ac.hmc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 30 August 2004 05:43 pm, Brooks Davis wrote:
> On Mon, Aug 30, 2004 at 05:29:22PM -0700, Peter Wemm wrote:
> > On Monday 30 August 2004 02:53 pm, Brooks Davis wrote:
> > > On Mon, Aug 30, 2004 at 05:34:23PM -0400, Andrew Gallatin wrote:
> > > > Brooks Davis writes:
> > > >  > I don't think so.  The main offenders will be programs that
> > > >  > walk the interface list via libkvm and programs that use
> > > >  > struct if_data. ifconfig does neither.  If you haven't
> > > >  > recompiled a module, a non-working ifconfig might result if
> > > >  > by some miracle you didn't get a panic on attach.
> > > >
> > > > ppc does not even build modules, so that's out.  An older
> > > > ifconfig pukes, while a new one works, so some sort of
> > > > kernel/userland ABI must have changed in the last week.  Has
> > > > the data exported by sysctl changed recently?
> > >
> > > I think I found it, at least partially.  The issue is struct
> > > if_msghdr which is used by ifconfig.  It contains a struct
> > > if_data. It has grown by a struct timeval.  The weird thing is
> > > that this shouldn't be a problem becuase if_msghdr has a length
> > > and my addition was to the end so ifconfig should be able to skip
> > > over it, but it doesn't seem to actually work.
> >
> > It is broken on amd64 too, FWIW.
>
> If if_msghdr is the problem, it will be broken on all platforms and a
> rebuild of everything thing should fix it.  I don't know why ifconfig
> is having a problem with the extension of if_msghdr.  It shouldn't
> care since the format is unchanged other then the addition of a
> structure at the very end and the ifm_msglen member appears to be
> used correct to advance through the array passed by the sysctl.

Actually, I more want to know why it didn't work.  But I haven't figured 
out where the message lengths are even getting set, let alone 
(mis?)used by ifconfig.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



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