mirror of https://github.com/ipxe/ipxe.git
[pxe] Select the correct network device on multiport cards
When trying to find the "first open network device", it helps to actually check the NETDEV_OPEN flag.pull/1/head
parent
246ddf5ee4
commit
8e8a348fd4
|
@ -51,8 +51,10 @@ static int pxe_exec ( struct image *image ) {
|
||||||
|
|
||||||
/* Arbitrarily pick the first open network device to use for PXE */
|
/* Arbitrarily pick the first open network device to use for PXE */
|
||||||
for_each_netdev ( netdev ) {
|
for_each_netdev ( netdev ) {
|
||||||
pxe_set_netdev ( netdev );
|
if ( netdev->state & NETDEV_OPEN ) {
|
||||||
break;
|
pxe_set_netdev ( netdev );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Many things will break if pxe_netdev is NULL */
|
/* Many things will break if pxe_netdev is NULL */
|
||||||
|
|
Loading…
Reference in New Issue