diff options
author | Ole Troan <otroan@employees.org> | 2024-10-23 21:13:19 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2024-10-25 09:33:03 +0000 |
commit | 75f4960d12a37d0b6ad2cd003e2a10ddb2527db6 (patch) | |
tree | 560193ffd05fcaf374dd1b4922fd39c3c22f341f | |
parent | b6cf8ff28ba18026efbd7c22388b1d99aaaed639 (diff) |
dhcp: client use mac address as client identifier
Previously the DHCP client use a constant client identifier (vpp 1.1).
Problem with that is that multiple VPP clients on the same link would
fail. Fixed by using MAC address instead.
Type: improvement
Change-Id: If37f4a14cc728bde6c9ef6c169957562d763c973
Signed-off-by: Ole Troan <otroan@employees.org>
-rw-r--r-- | src/plugins/dhcp/client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/dhcp/client.c b/src/plugins/dhcp/client.c index 8fa67c616b2..d81d2935577 100644 --- a/src/plugins/dhcp/client.c +++ b/src/plugins/dhcp/client.c @@ -1153,7 +1153,9 @@ dhcp_client_set_command_fn (vlib_main_t * vm, a->is_add = is_add; a->sw_if_index = sw_if_index; a->hostname = hostname; - a->client_identifier = format (0, "vpp 1.1%c", 0); + a->client_identifier = + format (0, "%U", format_ethernet_address, + vnet_sw_interface_get_hw_address (vnet_get_main (), sw_if_index)); a->set_broadcast_flag = set_broadcast_flag; /* |