RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#216
RDKB-64552: DHCP Lease Expire Time IPV4 is not getting updated in GUI#216aadhithan01 wants to merge 4 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
There was a problem hiding this comment.
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()underFEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
There was a problem hiding this comment.
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;
| 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); | ||
|
|
There was a problem hiding this comment.
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.
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