Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2001 17:11:31 -0500
From:      "C. Stephen Gunn" <csg@waterspout.com>
To:        Peter Blok <Peter.Blok@inter.NL.net>
Cc:        freebsd-net@freebsd.org
Message-ID:  <200102252211.f1PMBgc51779@dustdevil.waterspout.com>

next in thread | raw e-mail | index | archive | help
On Sun, Feb 25, 2001 at 04:46:47PM +0100, Peter Blok wrote:

> The panic occurs in ng_ether_output, during the ifconfig of the first vlan
> interface. It is coming from SIOCSIFADDR. It tries to do an arp request. The
> reason of the the panic is NULL pointer to the netgraph structure. I am not
> an expert to this code, but I believe this should have been done in
> ng_ether_attach.
> 
> I had difficulty re-producing this on my test machine, because the conf file
> was different. In my configuration the attach is probably not done because I
> don't have a couple of drivers configured in.

Is it possible that the parent interface is not "ifconfig up" at
the point you SIOCSIFADDR the vlan interface?  Setting an address
on an ethernet interface sets IFF_UP, in ether_ioctl().

So calling SIOCSIFADDR on the vlan interface eventually transmits
an arp who-has on the parent interface (with 802.1q encap for the
current VLAN of course) as a part of the AF_INET interface semantics.

The problem is that unless you do an "ifconfig up" or some other
"ifconfig" that results in if_init() getting called on the parent,
some drivers (and sometimes NetGraph) aren't initialized.  The vlan
to arp_ifinit() -> parent->if_start() never verifies the interface
is up.  BOOM.

I had a patch around somewhere that made vlan respect parent->if_flags,
but I'm not sure where it went.  I wasn't a good solution since
the initial ARP who-has broadcasts were lost, which could confuse
ARP handling sometimes, when there was an IP address conflict.

Unfortunately I no longer work for Purdue U where I did the vlan
stuff, and had a testing lab setup.. <sigh>

 - Steve

--
C. Stephen Gunn <csg@waterspout.com>   |   Waterspout Communications, Inc.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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