mirror of
https://github.com/xcat2/xNBA.git
synced 2025-04-14 17:19:25 +00: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:
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 */
|
||||
for_each_netdev ( netdev ) {
|
||||
pxe_set_netdev ( netdev );
|
||||
break;
|
||||
if ( netdev->state & NETDEV_OPEN ) {
|
||||
pxe_set_netdev ( netdev );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Many things will break if pxe_netdev is NULL */
|
||||
|
Loading…
x
Reference in New Issue
Block a user