mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
network: DHCP version logging typos
Some DHCP client log messages report "DHCP4" or "DHCP6" instead of "DHCPv4" or "DHCPv6" as used within the rest of the codebase. Typos fixed.
This commit is contained in:
parent
d4e9be97a3
commit
e6c4b5dc52
|
@ -1328,7 +1328,7 @@ static int client_receive_message(
|
|||
return 0;
|
||||
}
|
||||
if ((size_t) len < sizeof(DHCP6Message)) {
|
||||
log_dhcp6_client(client, "Too small to be DHCP6 message: ignoring");
|
||||
log_dhcp6_client(client, "Too small to be DHCPv6 message: ignoring");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1404,7 +1404,7 @@ int sd_dhcp6_client_stop(sd_dhcp6_client *client) {
|
|||
r = client_send_release(client);
|
||||
if (r < 0)
|
||||
log_dhcp6_client_errno(client, r,
|
||||
"Failed to send DHCP6 release message, ignoring: %m");
|
||||
"Failed to send DHCPv6 release message, ignoring: %m");
|
||||
|
||||
client_stop(client, SD_DHCP6_CLIENT_EVENT_STOP);
|
||||
|
||||
|
|
|
@ -1218,7 +1218,7 @@ static int dump_addresses(
|
|||
|
||||
r = strv_extendf(&buf, "%s%s%s%s%s%s",
|
||||
IN_ADDR_TO_STRING(local->family, &local->address),
|
||||
dhcp4 ? " (DHCP4 via " : "",
|
||||
dhcp4 ? " (DHCPv4 via " : "",
|
||||
dhcp4 ? IN4_ADDR_TO_STRING(&server_address) : "",
|
||||
dhcp4 ? ")" : "",
|
||||
ifindex <= 0 ? " on " : "",
|
||||
|
@ -2291,7 +2291,7 @@ static int link_status_one(
|
|||
r = sd_dhcp_client_id_to_string(client_id, &id);
|
||||
if (r >= 0) {
|
||||
r = table_add_many(table,
|
||||
TABLE_FIELD, "DHCP4 Client ID",
|
||||
TABLE_FIELD, "DHCPv4 Client ID",
|
||||
TABLE_STRING, id);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
|
@ -2302,7 +2302,7 @@ static int link_status_one(
|
|||
r = sd_network_link_get_dhcp6_client_iaid_string(info->ifindex, &iaid);
|
||||
if (r >= 0) {
|
||||
r = table_add_many(table,
|
||||
TABLE_FIELD, "DHCP6 Client IAID",
|
||||
TABLE_FIELD, "DHCPv6 Client IAID",
|
||||
TABLE_STRING, iaid);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
|
@ -2311,7 +2311,7 @@ static int link_status_one(
|
|||
r = sd_network_link_get_dhcp6_client_duid_string(info->ifindex, &duid);
|
||||
if (r >= 0) {
|
||||
r = table_add_many(table,
|
||||
TABLE_FIELD, "DHCP6 Client DUID",
|
||||
TABLE_FIELD, "DHCPv6 Client DUID",
|
||||
TABLE_STRING, duid);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
|
|
|
@ -2538,7 +2538,7 @@ static int link_update_name(Link *link, sd_netlink_message *message) {
|
|||
if (link->dhcp6_client) {
|
||||
r = sd_dhcp6_client_set_ifname(link->dhcp6_client, link->ifname);
|
||||
if (r < 0)
|
||||
return log_link_debug_errno(link, r, "Failed to update interface name in DHCP6 client: %m");
|
||||
return log_link_debug_errno(link, r, "Failed to update interface name in DHCPv6 client: %m");
|
||||
}
|
||||
|
||||
if (link->ndisc) {
|
||||
|
|
|
@ -1268,7 +1268,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
|
|||
self.wait_online('veth99:routable', 'veth-peer:routable')
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCPv4 via 192.168.5.1\)')
|
||||
self.assertIn('Gateway: 192.168.5.3', output)
|
||||
self.assertRegex(output, 'DNS: 192.168.5.1\n *192.168.5.10')
|
||||
self.assertRegex(output, 'NTP: 192.168.5.1\n *192.168.5.11')
|
||||
|
@ -5862,7 +5862,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
def check_dhcp_server(self, persist_leases=True):
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCPv4 via 192.168.5.1\)')
|
||||
self.assertIn('Gateway: 192.168.5.3', output)
|
||||
self.assertRegex(output, 'DNS: 192.168.5.1\n *192.168.5.10')
|
||||
self.assertRegex(output, 'NTP: 192.168.5.1\n *192.168.5.11')
|
||||
|
@ -5926,7 +5926,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, rf'Address: {client_address} \(DHCP4 via {server_address}\)')
|
||||
self.assertRegex(output, rf'Address: {client_address} \(DHCPv4 via {server_address}\)')
|
||||
self.assertIn(f'Gateway: {server_address}', output)
|
||||
self.assertIn(f'DNS: {server_address}', output)
|
||||
self.assertIn(f'NTP: {server_address}', output)
|
||||
|
@ -5948,7 +5948,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, rf'Address: {client_address} \(DHCP4 via {server_address}\)')
|
||||
self.assertRegex(output, rf'Address: {client_address} \(DHCPv4 via {server_address}\)')
|
||||
self.assertIn(f'Gateway: {server_address}', output)
|
||||
self.assertIn(f'DNS: {server_address}', output)
|
||||
self.assertIn(f'NTP: {server_address}', output)
|
||||
|
@ -5964,7 +5964,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCPv4 via 192.168.5.1\)')
|
||||
self.assertIn('Gateway: 192.168.5.3', output)
|
||||
self.assertIn('DNS: 192.168.5.1', output)
|
||||
self.assertIn('NTP: 192.168.5.1', output)
|
||||
|
@ -5976,7 +5976,7 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCP4 via 192.168.5.1\)')
|
||||
self.assertRegex(output, r'Address: 192.168.5.[0-9]* \(DHCPv4 via 192.168.5.1\)')
|
||||
self.assertIn('Gateway: 192.168.5.1', output)
|
||||
self.assertIn('Time Zone: Europe/Berlin', output)
|
||||
|
||||
|
@ -5987,8 +5987,8 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertIn('Address: 10.1.1.200 (DHCP4 via 10.1.1.1)', output)
|
||||
self.assertIn('DHCP4 Client ID: 12:34:56:78:9a:bc', output)
|
||||
self.assertIn('Address: 10.1.1.200 (DHCPv4 via 10.1.1.1)', output)
|
||||
self.assertIn('DHCPv4 Client ID: 12:34:56:78:9a:bc', output)
|
||||
|
||||
def test_dhcp_server_static_lease_default_client_id(self):
|
||||
copy_network_unit('25-veth.netdev', '25-dhcp-client.network', '25-dhcp-server-static-lease.network')
|
||||
|
@ -5997,8 +5997,8 @@ class NetworkdDHCPServerTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('veth99')
|
||||
print(output)
|
||||
self.assertIn('Address: 10.1.1.200 (DHCP4 via 10.1.1.1)', output)
|
||||
self.assertRegex(output, 'DHCP4 Client ID: IAID:[0-9a-z]*/DUID')
|
||||
self.assertIn('Address: 10.1.1.200 (DHCPv4 via 10.1.1.1)', output)
|
||||
self.assertRegex(output, 'DHCPv4 Client ID: IAID:[0-9a-z]*/DUID')
|
||||
|
||||
class NetworkdDHCPServerRelayAgentTests(unittest.TestCase, Utilities):
|
||||
|
||||
|
@ -6021,7 +6021,7 @@ class NetworkdDHCPServerRelayAgentTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = networkctl_status('client')
|
||||
print(output)
|
||||
self.assertRegex(output, r'Address: 192.168.5.150 \(DHCP4 via 192.168.5.1\)')
|
||||
self.assertRegex(output, r'Address: 192.168.5.150 \(DHCPv4 via 192.168.5.1\)')
|
||||
|
||||
def test_relay_agent_on_bridge(self):
|
||||
copy_network_unit('25-agent-bridge.netdev',
|
||||
|
|
Loading…
Reference in a new issue