Skip to content

RDKCOM-5595: RDKBDEV-3450 The CM is not updated with DNS Name (Option15), instead utopia.net is displayed in LAN side provisioning.#214

Open
aprasad-97 wants to merge 1 commit into
rdkcentral:mainfrom
aprasad-97:RDKBDEV-3450
Open

RDKCOM-5595: RDKBDEV-3450 The CM is not updated with DNS Name (Option15), instead utopia.net is displayed in LAN side provisioning.#214
aprasad-97 wants to merge 1 commit into
rdkcentral:mainfrom
aprasad-97:RDKBDEV-3450

Conversation

@aprasad-97

Copy link
Copy Markdown
Contributor

Reason for change: Added provisioning to fetch the DHCPv4 Option 15 (Domain Name) value via udhcpc and forward it to the WAN Manager. The WAN Manager then sets the corresponding sysevent, enabling dnsmasq to propagate the domain name to LAN clients.

Risks: Low

Copilot AI review requested due to automatic review settings June 10, 2026 09:36
@aprasad-97 aprasad-97 requested a review from a team as a code owner June 10, 2026 09:36

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

Note

Copilot was unable to run its full agentic suite in this review.

This PR adds DHCPv4 domain-name propagation to WanManager via sysevent and uses it as an additional trigger for DHCP server restart when DNS/domain changes.

Changes:

  • Introduces a new sysevent key (dhcp_domain) for storing the current IPv4 domain name.
  • Captures and updates the domain name in wan_updateDNS() and includes it in the “restart needed” comparison.
  • Extends DHCPv4 event parsing/data model to carry the domain name through IPC into WANMGR_IPV4_DATA.

Reviewed changes

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

File Description
source/WanManager/wanmgr_sysevents.h Adds a sysevent constant for DHCP domain name storage.
source/WanManager/wanmgr_interface_sm.c Reads/writes the domain sysevent and factors domain changes into restart decision.
source/WanManager/wanmgr_dhcpv4_apis.c Copies domain from IPC data into IPv4 data and treats domain changes as update-worthy.
source/TR-181/include/wanmgr_dml.h Extends WANMGR_IPV4_DATA with a domain field.

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

Comment thread source/WanManager/wanmgr_dhcpv4_apis.c Outdated
Comment thread source/WanManager/wanmgr_interface_sm.c
Comment thread source/WanManager/wanmgr_interface_sm.c Outdated
Comment on lines +1000 to +1001
CcspTraceInfo(("%s %d: Domain is received, setting sysevent dhcp_domain = %s\n", __FUNCTION__, __LINE__, p_VirtIf->IP.Ipv4Data.domain));
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_IPV4_DOMAIN, p_VirtIf->IP.Ipv4Data.domain, 0);
Comment thread source/WanManager/wanmgr_sysevents.h
@pradeeptakdas pradeeptakdas changed the title RDKBDEV-3450 - The CM is not updated with DNS Name (Option15), instead utopia.net is displayed in LAN side provisioning. RDKCOM-5595: RDKBDEV-3450 The CM is not updated with DNS Name (Option15), instead utopia.net is displayed in LAN side provisioning. Jun 10, 2026
…d utopia.net is displayed in LAN side provisioning.

Reason for change: Added provisioning to fetch the DHCPv4 Option 15 (Domain Name) value via udhcpc and forward it to the WAN Manager. The WAN Manager then sets the corresponding sysevent, enabling dnsmasq to propagate the domain name to LAN clients.

Risks: Low

Signed-off-by: Aiswarya Prasad <aprasad@maxlinear.com>
Copilot AI review requested due to automatic review settings June 11, 2026 15:54

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 4 out of 4 changed files in this pull request and generated 5 comments.

Comment on lines 83 to +86
memcpy(pDhcpv4Data->gateway, pIpcIpv4Data->gateway, BUFLEN_32);
memcpy(pDhcpv4Data->dnsServer, pIpcIpv4Data->dnsServer, BUFLEN_64);
memcpy(pDhcpv4Data->dnsServer1, pIpcIpv4Data->dnsServer1, BUFLEN_64);
snprintf(pDhcpv4Data->domain, sizeof(pDhcpv4Data->domain), "%s", pIpcIpv4Data->domain);
Comment thread source/WanManager/wanmgr_interface_sm.c
Comment thread source/WanManager/wanmgr_sysevents.h
Comment on lines +871 to +873
// clear domain name sysevent
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_IPV4_DOMAIN, "", 0);

Comment on lines +1011 to +1012
CcspTraceInfo(("%s %d: Setting dhcp_domain sysevent = \"%s\"\n", __FUNCTION__, __LINE__, desiredDomain));
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_IPV4_DOMAIN, desiredDomain, 0);
memcpy(pDhcpv4Data->gateway, pIpcIpv4Data->gateway, BUFLEN_32);
memcpy(pDhcpv4Data->dnsServer, pIpcIpv4Data->dnsServer, BUFLEN_64);
memcpy(pDhcpv4Data->dnsServer1, pIpcIpv4Data->dnsServer1, BUFLEN_64);
snprintf(pDhcpv4Data->domain, sizeof(pDhcpv4Data->domain), "%s", pIpcIpv4Data->domain);

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.

Hi @aprasad-97,

Could you use memcpy? Or do you see any issue with it?

@aprasad-97 aprasad-97 Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually, this is used to handle Buffer safety and NULL termination which is not handled by memcpy.

@S-Parthiban-Selvaraj

Copy link
Copy Markdown
Contributor

Do we have any struct change in any other component related to this? like common lib

@aprasad-97

Copy link
Copy Markdown
Contributor Author

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.

5 participants