Project

General

Profile

Actions

Bug #14244

open

``get_interface_list()`` in ``util.inc`` does not always match the expected device in ``dmesg``.

Added by Jim Pingle over 1 year ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Interfaces
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Plus-Next
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

In source:src/etc/inc/util.inc#L1730 the get_interface_list() function finds a line based on the interface name, but it isn't anchored, so it matches any part of the device name.

Some systems have both em0 as a NIC and and ahciem0 device unrelated to networking, and the cosmetic description based on dmesg contents can show the ahciem0 description for an em0 interface.

A few points here:

  • It's running dmesg for each interface here when it seems like that could be read in once, cached, and matched internally rather than using a new shell call each time.
  • For that matter, it should be using /var/log/dmesg.boot and not the dmesg command.
  • The regex pattern needs improved to ensure it's matching the whole device name exactly and nothing else.
  • Or maybe it could ditch that dmesg method entirely and use pciconf output which would be much more accurate.

This doesn't appear to have any bearing on functionality since the only place that gets used is in the printed interface list when performing interface assignment.

No data to display

Actions

Also available in: Atom PDF