diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 56baf125bd..8830f79eb7 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -1814,13 +1814,13 @@ static int link_status_one( TABLE_STRING, bond_mode_to_string(info->mode), TABLE_EMPTY, TABLE_STRING, "Miimon:", - TABLE_TIMESPAN_MSEC, jiffies_to_usec(info->miimon), + TABLE_TIMESPAN_MSEC, info->miimon * USEC_PER_MSEC, TABLE_EMPTY, TABLE_STRING, "Updelay:", - TABLE_TIMESPAN_MSEC, jiffies_to_usec(info->updelay), + TABLE_TIMESPAN_MSEC, info->updelay * USEC_PER_MSEC, TABLE_EMPTY, TABLE_STRING, "Downdelay:", - TABLE_TIMESPAN_MSEC, jiffies_to_usec(info->downdelay)); + TABLE_TIMESPAN_MSEC, info->downdelay * USEC_PER_MSEC); if (r < 0) return table_log_add_error(r); diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index d626e4b641..989020e0c6 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1218,6 +1218,17 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertEqual('balance-tlb 5', read_link_attr('bond98', 'bonding', 'mode')) self.assertEqual('1', read_link_attr('bond98', 'bonding', 'tlb_dynamic_lb')) + output = check_output(*networkctl_cmd, '-n', '0', 'status', 'bond99', env=env) + print(output) + self.assertIn('Mode: 802.3ad', output) + self.assertIn('Miimon: 1s', output) + self.assertIn('Updelay: 2s', output) + self.assertIn('Downdelay: 2s', output) + + output = check_output(*networkctl_cmd, '-n', '0', 'status', 'bond98', env=env) + print(output) + self.assertIn('Mode: balance-tlb', output) + def test_vlan(self): copy_unit_to_networkd_unit_path('21-vlan.netdev', '11-dummy.netdev', '21-vlan.network', '21-vlan-test1.network')