Fix a panic when it occurred during initializing the ndis driver because

it try to read network address through ifnet structure which is NULL
until the ndis driver's initialization is finished.

Reviewed by:	thompsa
This commit is contained in:
Weongyo Jeong 2008-05-15 04:29:28 +00:00
parent ccd3953e5f
commit d9585f801b

View File

@ -1360,6 +1360,10 @@ NdisReadNetworkAddress(status, addr, addrlen, adapter)
block = (ndis_miniport_block *)adapter;
sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
if (sc->ifp == NULL) {
*status = NDIS_STATUS_FAILURE;
return;
}
#ifdef IFP2ENADDR
if (bcmp(IFP2ENADDR(sc->ifp), empty, ETHER_ADDR_LEN) == 0)