Skip to content

Commit

Permalink
[pxe] Select the correct network device on multiport cards
Browse files Browse the repository at this point in the history
When trying to find the "first open network device", it helps to
actually check the NETDEV_OPEN flag.
  • Loading branch information
Michael Brown committed Nov 21, 2008
1 parent 246ddf5 commit 8e8a348
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/arch/i386/image/pxe_image.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 8e8a348

Please sign in to comment.