Skip to content

RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#131

Open
jgopi571 wants to merge 2 commits into
developfrom
RDKB-64552/dhcp_lease_issue
Open

RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#131
jgopi571 wants to merge 2 commits into
developfrom
RDKB-64552/dhcp_lease_issue

Conversation

@jgopi571

Copy link
Copy Markdown

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

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
@jgopi571
jgopi571 requested a review from a team as a code owner July 14, 2026 11:15
Copilot AI review requested due to automatic review settings July 14, 2026 11:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dhcpv4c into the TR-181 middle-layer library.
  • Update Device.DHCPv4.Client.{i}.LeaseTimeRemaining handling to read the remaining lease time from dhcpv4c_get_ert_remain_lease_time() instead of CosaDmlDhcpcGetInfo().

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
Copilot AI review requested due to automatic review settings July 15, 2026 09:35
@github-actions

Copy link
Copy Markdown

📋 PR Format Reminder

  • Description missing:
    • Test Procedure
    • Risks (Low / Medium / High)

Expected:

TICKET-123 : brief description

Reason for change: why
Test Procedure: how to verify
Risks: Low / Medium / High
Priority: P0 / P1 / P2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants