|
@@ -328,11 +328,20 @@ parse_settings_name ( const char *name,
|
328
|
328
|
|
329
|
329
|
/* Parse each name component in turn */
|
330
|
330
|
while ( remainder ) {
|
|
331
|
+ struct net_device *netdev;
|
|
332
|
+
|
331
|
333
|
subname = remainder;
|
332
|
334
|
remainder = strchr ( subname, '.' );
|
333
|
335
|
if ( remainder )
|
334
|
336
|
*(remainder++) = '\0';
|
335
|
|
- settings = get_child ( settings, subname );
|
|
337
|
+
|
|
338
|
+ /* Special case "netX" root settings block */
|
|
339
|
+ if ( ( subname == name_copy ) && ! strcmp ( subname, "netX" ) &&
|
|
340
|
+ ( ( netdev = last_opened_netdev() ) != NULL ) )
|
|
341
|
+ settings = get_child ( settings, netdev->name );
|
|
342
|
+ else
|
|
343
|
+ settings = get_child ( settings, subname );
|
|
344
|
+
|
336
|
345
|
if ( ! settings )
|
337
|
346
|
break;
|
338
|
347
|
}
|