diff options
author | delphij <delphij@FreeBSD.org> | 2005-06-14 14:50:40 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2005-06-14 14:50:40 +0000 |
commit | 92159568b42d8e1fea5ab9bd5a033cc8468a511f (patch) | |
tree | 1d5bf57c79c7a46497ce57c030ed2364f48d9b28 /sys/dev/an | |
parent | 874837c5e58ee66db82f9320d6295639843a4682 (diff) | |
download | FreeBSD-src-92159568b42d8e1fea5ab9bd5a033cc8468a511f.zip FreeBSD-src-92159568b42d8e1fea5ab9bd5a033cc8468a511f.tar.gz |
Initialize sc->an_ifp when doing if_alloc(). This prevents an(4)
from being panic when attaching.
Approved by: re (scottl)
Diffstat (limited to 'sys/dev/an')
-rw-r--r-- | sys/dev/an/if_an.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index 0aae094..1722471 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -676,7 +676,7 @@ an_attach(sc, unit, flags) mtx_init(&sc->an_mtx, device_get_nameunit(sc->an_dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); - ifp = if_alloc(IFT_ETHER); + ifp = sc->an_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { printf("an%d: can not if_alloc()\n", sc->an_unit); goto fail; |