Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Sep 2012 08:35:56 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-net@freebsd.org
Cc:        Marcin Cieslak <saper@saper.info>
Subject:   Re: enc(4) uninitialized in -current?
Message-ID:  <201209280835.56684.jhb@freebsd.org>
In-Reply-To: <slrnk68jk4.2uvc.saper@saper.info>
References:  <slrnk66vbe.2uvc.saper@saper.info> <201209270853.31318.jhb@freebsd.org> <slrnk68jk4.2uvc.saper@saper.info>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, September 27, 2012 9:02:59 am Marcin Cieslak wrote:
> >> John Baldwin <jhb@freebsd.org> wrote:
> > On Wednesday, September 26, 2012 6:42:19 pm Garrett Cooper wrote:
> >> On Wed, Sep 26, 2012 at 3:33 PM, Olivier Cochard-Labb=C3=A9
> >> <olivier@cochard.me> wrote:
> >> > On Thu, Sep 27, 2012 at 12:10 AM, Marcin Cieslak <saper@saper.info> =
wrote:
> >> >> I have just updated by 9.0-something laptop to 10.0-CURRENT r240948
> >> >> and it very quickly panics after enabling network with IPsec
> >> >> (I am using IPsec w/racoon for IPv4 over 802.11, also using
> >> >> tunelled IPv6).
> >> >
> >> > I don't know if it's related, but one of the first dmesg message
> >> > displayd on my -current (rev 240921) is:
> >> >
> >> > module_register: module enc already exists!
> >> > Module enc failed to register: 17
> >
> > I suspect this is the root cause and that the "wrong" global variable i=
s being=20
> > used in ipsec_output.c due to duplicate symbols.
>=20
> As the original poster: I don't have this "module enc already exists!" me=
ssage.
> I have had "device enc" in the kernel config file and I didn't try
> to load if_enc as module. I have IPSEC permanently enabled
> in the kernel and it is initialized at boot with setkey and later
> with racoon.=20
>=20
> > OTOH, have you created an enc0 device?  I can't find anything that=20
> > automatically creates it.
>=20
> No. Previously, in 9.x times, it was always present in the ifconfig outpu=
t.

Ok, I think that is the root cause.

HEAD should still be creating an enc0.  The enc.c file creates an enc_clone=
r:

IFC_SIMPLE_DECLARE(enc, 1);

static int
enc_modevent(module_t mod, int type, void *data)
{
	switch (type) {
	case MOD_LOAD:
		mtx_init(&enc_mtx, "enc mtx", NULL, MTX_DEF);
		if_clone_attach(&enc_cloner);
		break;

That '1' is the minimum number of interfaces to create on attach in
ifc_simple_attach().  I've no idea why enc0 isn't being created on boot, but
it should be.

=2D-=20
John Baldwin



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