mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +03:00
[netdevice] Ensure consistent interpretation of "netX" device name
Ensure that the "${netX/...}" settings mechanism always uses the same
interpretation of the network device corresponding to "netX" as any
other mechanism that performs a name-based lookup of a network device.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -370,8 +370,8 @@ struct settings_operations netdev_settings_operations = {
|
|||||||
static struct settings * netdev_redirect ( struct settings *settings ) {
|
static struct settings * netdev_redirect ( struct settings *settings ) {
|
||||||
struct net_device *netdev;
|
struct net_device *netdev;
|
||||||
|
|
||||||
/* Redirect to most recently opened network device */
|
/* Redirect to "netX" network device */
|
||||||
netdev = last_opened_netdev();
|
netdev = find_netdev ( settings->name );
|
||||||
if ( netdev ) {
|
if ( netdev ) {
|
||||||
return netdev_settings ( netdev );
|
return netdev_settings ( netdev );
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user