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:
parent
ccd3953e5f
commit
d9585f801b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user