Skip to content

Commit

Permalink
Rename duid -> type
Browse files Browse the repository at this point in the history
  • Loading branch information
ssahani committed Jan 12, 2024
1 parent bf2bc7a commit 86c31d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/manager/network-config-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ _public_ int ncm_link_set_dhcp_client_duid(int argc, char *argv[]) {
kind = r;

continue;
} else if (str_eq_fold(argv[i], "duid")) {
} else if (str_eq_fold(argv[i], "duid") || str_eq_fold(argv[i], "type")) {
int k = -1;

parse_next_arg(argv, argc, i);
Expand Down
2 changes: 1 addition & 1 deletion src/manager/network-manager-ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int help(void) {
"\n\t\t\t\t use-domains-ipv4 [BOOLEAN] use-domains-ipv6 [BOOLEAN] send-release-ipv4 [BOOLEAN] send-release-ipv6 [BOOLEAN] Configures DHCP client.\n"
" set-dhcp4-cid dev [DEVICE] id [IDENTIFIER {mac|duid|duid-only} Configures device DHCPv4 identifier.\n"
" set-dhcp-iaid dev [DEVICE] family|f iaid [IAID] Configures the DHCP Identity Association Identifier (IAID)\n"
" set-dhcp-duid dev|system [DEVICE] family|f [ipv4|ipv6|4|6] duid [DUID {link-layer-time|vendor|link-layer|uuid|0…65535}] data [RAWDATA]"
" set-dhcp-duid dev|system [DEVICE] family|f [ipv4|ipv6|4|6] type [DUIDType {link-layer-time|vendor|link-layer|uuid|0…65535}] data [RAWDATA]"
"\n\t\t\t\t Sets DUID of DHCPv4 or DHCPv6 Client.\n"
" set-link-state dev [DEVICE] [STATE {up|down}] Configures device State.\n"
" show-addr dev [DEVICE] [family|f ipv4|ipv6|4|6] Show device addresses\n"
Expand Down
6 changes: 3 additions & 3 deletions tests/cmocka/basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ static void test_set_dhcp6_duid_custom(void **state) {
_cleanup_(key_file_freep) KeyFile *key_file = NULL;
int r;

assert_true(system("nmctl set-dhcp-duid dev test99 f 6 duid 1234 data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);
assert_true(system("nmctl set-dhcp-duid dev test99 f 6 type 1234 data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);

r = parse_key_file("/etc/systemd/network/10-test99.network", &key_file);
assert_true(r >= 0);
Expand All @@ -453,7 +453,7 @@ static void test_set_dhcp6_duid(void **state) {
_cleanup_(key_file_freep) KeyFile *key_file = NULL;
int r;

assert_true(system("nmctl set-dhcp-duid dev test99 f 6 duid vendor data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);
assert_true(system("nmctl set-dhcp-duid dev test99 f 6 type vendor data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);

r = parse_key_file("/etc/systemd/network/10-test99.network", &key_file);
assert_true(r >= 0);
Expand All @@ -469,7 +469,7 @@ static void test_set_dhcp4_duid(void **state) {
_cleanup_(key_file_freep) KeyFile *key_file = NULL;
int r;

assert_true(system("nmctl set-dhcp-duid dev test99 f 4 duid vendor data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);
assert_true(system("nmctl set-dhcp-duid dev test99 f 4 type vendor data 00:00:ab:11:f9:2a:c2:77:29:f9:5c:00") >= 0);

r = parse_key_file("/etc/systemd/network/10-test99.network", &key_file);
assert_true(r >= 0);
Expand Down

0 comments on commit 86c31d0

Please sign in to comment.