mirror of
https://github.com/ipxe/ipxe
synced 2025-12-08 02:10:25 +03:00
[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.
This commit is contained in:
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user