Fix VPP-1528 get the same IP address from DHCP server for two VPP DHCP clients
Change-Id: I18dfe51000758f44b991d2dd065c9aa2bc5863d5
Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
diff --git a/src/vnet/dhcp/client.c b/src/vnet/dhcp/client.c
index b89b8f2..b571068 100644
--- a/src/vnet/dhcp/client.c
+++ b/src/vnet/dhcp/client.c
@@ -1209,7 +1209,7 @@
dcm->vlib_main = vm;
dcm->vnet_main = vnet_get_main ();
- dcm->seed = 0xdeaddabe;
+ dcm->seed = (u32) clib_cpu_time_now ();
return 0;
}
diff --git a/src/vnet/dhcp/dhcp6_pd_client_dp.c b/src/vnet/dhcp/dhcp6_pd_client_dp.c
index bc6baf7..c1bf5f8 100644
--- a/src/vnet/dhcp/dhcp6_pd_client_dp.c
+++ b/src/vnet/dhcp/dhcp6_pd_client_dp.c
@@ -647,10 +647,8 @@
cm->vlib_main = vm;
cm->vnet_main = vnet_get_main ();
-
cm->publisher_node = ~0;
-
- cm->seed = 0xdeaddabe;
+ cm->seed = (u32) clib_cpu_time_now ();
return 0;
}