Skip to content

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

Open
aadhithan01 wants to merge 4 commits into
rdkcentral:mainfrom
jgopi571:RDKB-64552/dhcp_lease
Open

RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#216
aadhithan01 wants to merge 4 commits into
rdkcentral:mainfrom
jgopi571:RDKB-64552/dhcp_lease

Conversation

@aadhithan01

Copy link
Copy Markdown
Contributor

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
@aadhithan01
aadhithan01 requested a review from a team as a code owner July 10, 2026 08:30
Copilot AI review requested due to automatic review settings July 10, 2026 08:30

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 aims to fix an issue where the IPv4 DHCP lease expire time is not being updated in the GUI by adjusting how WAN Manager publishes DHCPv4 lease-related sysevents.

Changes:

  • Removes setting of DHCPv4-related sysevents (server, state, lease time) from wanmgr_set_Ipv4Sysevent() under FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/WanManager/wanmgr_sysevents.c
Copilot AI review requested due to automatic review settings July 14, 2026 08:30
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 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 no new comments.

Comments suppressed due to low confidence (1)

source/WanManager/wanmgr_sysevents.c:278

  • With FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE enabled, this removes the only place that updates per-interface sysevents for DHCP server/state and (critically) ipv4_%s_lease_time when the Interface SM activates IPv4. Repo search shows SYSEVENT_IPV4_DHCP_SERVER / _STATE are otherwise only set during wanmgr_sysevents_ipv4Info_init() (empty/0 values) and never updated on DHCP BOUND in configurable-WAN builds, so these values can remain stale and prevent the GUI from showing the correct lease/expiry until a renew (and DHCP server/state may never update at all).
    ipc_dhcpv4_data_t ipc_ipv4Data;
    WANMGR_IPV4_DATA ipv4Data;

Copilot AI review requested due to automatic review settings July 14, 2026 08:33

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.

Comment thread source/WanManager/wanmgr_sysevents.c
Comment thread source/WanManager/wanmgr_sysevents.c
Comment on lines 201 to 205
snprintf(name, sizeof(name), SYSEVENT_IPV4_US_CURRENT_RATE, pDhcpcInfo->dhcpcInterface);
snprintf(value, sizeof(value), "%d", pDhcpcInfo->upstreamCurrRate);
sysevent_set(sysevent_fd, sysevent_token, name, value, 0);

snprintf(name, sizeof(name), SYSEVENT_IPV4_LEASE_TIME, pDhcpcInfo->dhcpcInterface);
snprintf(value, sizeof(value), "%d", pDhcpcInfo->leaseTime);
sysevent_set(sysevent_fd, sysevent_token, name, value, 0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ipv4_%s_lease_time is now owned and set by dhcpmgr in set_inf_sysevents() ([dhcpmgr_v4_lease_handler.c] This function is called on every DHCP packet including RENEW — it updates lease_time whenever the value changes, and always refreshes start_time unconditionally. The responsibility for these sysevents was intentionally moved from wanmgr to dhcpmgr, which is the correct owner of DHCP lease data. wanmgr was previously overwriting these with stale values, which was the root cause of the GUI not showing correct lease-expire time.

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.

3 participants