ethernet_interface: Update ethtool for interface updates
We don't want this info going stale
Change-Id: I18345dedd637853fd77a765fad28f697e48f6c80
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/ethernet_interface.cpp b/src/ethernet_interface.cpp
index 5da1440..67dd16b 100644
--- a/src/ethernet_interface.cpp
+++ b/src/ethernet_interface.cpp
@@ -115,15 +115,6 @@
EthernetInterfaceIntf::ntpServers(
config.map.getValueStrings("Network", "NTP"));
- if (ifIdx > 0)
- {
- auto ethInfo = ignoreError("GetEthInfo", *info.name, {}, [&] {
- return system::getEthInfo(*info.name);
- });
- EthernetInterfaceIntf::autoNeg(ethInfo.autoneg);
- EthernetInterfaceIntf::speed(ethInfo.speed);
- }
-
updateInfo(info);
if (info.vlan_id)
@@ -153,6 +144,14 @@
{
EthernetInterfaceIntf::mtu(*info.mtu);
}
+ if (ifIdx > 0)
+ {
+ auto ethInfo = ignoreError("GetEthInfo", *info.name, {}, [&] {
+ return system::getEthInfo(*info.name);
+ });
+ EthernetInterfaceIntf::autoNeg(ethInfo.autoneg);
+ EthernetInterfaceIntf::speed(ethInfo.speed);
+ }
}
bool EthernetInterface::originIsManuallyAssigned(IP::AddressOrigin origin)