RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#131
Open
jgopi571 wants to merge 2 commits into
Open
RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#131jgopi571 wants to merge 2 commits into
jgopi571 wants to merge 2 commits into
Conversation
Reason for change: DHCP Lease Expire Time IPV4 is not getting updated in GUI Test Procedure: Verify the ipv4 dhcp lease time in gui and dmcli cmd output Risks: Low Priority: P1 Signed-off-by:Jayajothi_Gopi@comcast.com
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses an issue where the IPv4 DHCP client lease time remaining/expire time is not updating correctly in the GUI by switching the TR-181 DML path to query the remaining lease time via a DHCPv4 client API and linking the required client library.
Changes:
- Link
libapi_dhcpv4cinto the TR-181 middle-layer library. - Update
Device.DHCPv4.Client.{i}.LeaseTimeRemaininghandling to read the remaining lease time fromdhcpv4c_get_ert_remain_lease_time()instead ofCosaDmlDhcpcGetInfo().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/TR-181/middle_layer_src/Makefile.am | Adds linkage to the DHCPv4 client API library needed by the new lease-time query. |
| source/TR-181/middle_layer_src/cosa_dhcpv4_dml.c | Switches lease-time retrieval to the DHCPv4 client API and adds the corresponding header include. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+92
| #include <syscfg/syscfg.h> | ||
| #include "dhcp_client_common_utils.h" | ||
| #include <ccsp/dhcpv4c_api.h> |
Comment on lines
811
to
814
| /* collect value */ | ||
| CosaDmlDhcpcGetInfo(NULL, pCxtLink->InstanceNumber, &pDhcpc->Info); | ||
|
|
||
| dhcpv4c_get_ert_remain_lease_time((UINT*)&pDhcpc->Info.LeaseTimeRemaining); | ||
| *pInt = pDhcpc->Info.LeaseTimeRemaining; | ||
|
|
Reason for change: DHCP Lease Expire Time IPV4 is not getting updated in GUI Test Procedure: Verify the ipv4 dhcp lease time in gui and dmcli cmd output Risks: Low Priority: P1 Signed-off-by:Jayajothi_Gopi@comcast.com
|
📋 PR Format Reminder
Expected: |
|
|
||
| libCcspDhcpMgr_middle_layer_src_la_SOURCES = cosa_dhcpv4_internal.c cosa_dhcpv6_internal.c plugin_main.c cosa_apis_util.c cosa_dhcpv4_dml.c cosa_dhcpv6_dml.c cosa_webconfig_api.c cosa_x_cisco_com_devicecontrol_internal.c dhcpmgr_rbus_apis.c | ||
| libCcspDhcpMgr_middle_layer_src_la_LDFLAGS = -lccsp_common -lsyscfg -lsysevent -lsecure_wrapper -ltelemetry_msgsender | ||
| libCcspDhcpMgr_middle_layer_src_la_LDFLAGS = -lccsp_common -lsyscfg -lsysevent -lsecure_wrapper -ltelemetry_msgsender -lapi_dhcpv4c |
|
|
||
| #include <syscfg/syscfg.h> | ||
| #include "dhcp_client_common_utils.h" | ||
| #include <dhcpv4c_api.h> |
Comment on lines
810
to
+814
| { | ||
| /* collect value */ | ||
| CosaDmlDhcpcGetInfo(NULL, pCxtLink->InstanceNumber, &pDhcpc->Info); | ||
|
|
||
| UINT leaseTimeRemaining = 0; | ||
| dhcpv4c_get_ert_remain_lease_time(&leaseTimeRemaining); | ||
| pDhcpc->Info.LeaseTimeRemaining = (int)leaseTimeRemaining; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change: DHCP Lease Expire Time IPV4 is not getting updated in GUI Test Procedure: Verify the ipv4 dhcp lease time in gui and dmcli cmd output Risks: Low
Priority: P1
Signed-off-by:Jayajothi_Gopi@comcast.com