aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2023-01-17 12:42:46 +0000
committerMichael Brown <mcb30@ipxe.org>2023-01-17 12:42:46 +0000
commit08740220baba87cbc6acb1c00cd5b492ac0c5a08 (patch)
treef729439f6496ed85cdbf2a391007e32c6d5be3f9
parent2dcef4b7a11a780a684a69021a0c91bc43e03883 (diff)
downloadipxe-08740220baba87cbc6acb1c00cd5b492ac0c5a08.zip
ipxe-08740220baba87cbc6acb1c00cd5b492ac0c5a08.tar.gz
ipxe-08740220baba87cbc6acb1c00cd5b492ac0c5a08.tar.bz2
[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>
-rw-r--r--src/net/netdev_settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/netdev_settings.c b/src/net/netdev_settings.c
index cc2e103..fb98663 100644
--- a/src/net/netdev_settings.c
+++ b/src/net/netdev_settings.c
@@ -370,8 +370,8 @@ struct settings_operations netdev_settings_operations = {
static struct settings * netdev_redirect ( struct settings *settings ) {
struct net_device *netdev;
- /* Redirect to most recently opened network device */
- netdev = last_opened_netdev();
+ /* Redirect to "netX" network device */
+ netdev = find_netdev ( settings->name );
if ( netdev ) {
return netdev_settings ( netdev );
} else {