Skip to content

RDKB-65015 RDKB-65326 : Enable Multi-profile XDNS on XB10(single build) - #26

Merged
apattu200 merged 5 commits into
developfrom
feature/dns_xb10
Jul 28, 2026
Merged

RDKB-65015 RDKB-65326 : Enable Multi-profile XDNS on XB10(single build)#26
apattu200 merged 5 commits into
developfrom
feature/dns_xb10

Conversation

@Nithishkumar-T

Copy link
Copy Markdown
Contributor

Reason for change: Enable Multiprofile XDNS bridges by default in XB10
Test Procedure: Residential and Business devicemode needs to be tested.
Functionality of the following DMLs need to be tested:

Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.EnableMultiProfileXDNS
Device.X_RDKCENTRAL-COM_XDNS.DNSSecEnable

Above mentioned DML parameters SHOULD work in both residential and business devicemode.
Risks: Low
Priority: P1
Signed-off-by:Nithishkumar_Thirumoorthi@comcast.com

Copilot AI review requested due to automatic review settings July 9, 2026 09:00
@Nithishkumar-T
Nithishkumar-T requested review from a team as code owners July 9, 2026 09:00

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

Enables Multi-profile XDNS behavior on XB10 single-build by removing device-mode (business vs residential) gating so the same code paths execute under _ONESTACK_PRODUCT_REQ_ for both modes.

Changes:

  • Removed is_devicemode_business() conditionals around DNSSEC syscfg updates and multi-profile handling so behavior applies in both device modes.
  • Updated webconfig cache application and blob parsing paths to treat RDK-default DNS strings consistently across modes.
  • Ensured MultiProfile status lines are handled when syncing/writing resolv.conf-derived content.

Reviewed changes

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

File Description
source/dmlxdns/cosa_xdns_webconfig_api.c Removes business-mode gating for DNSSEC syscfg updates and default DNS parsing during webconfig apply.
source/dmlxdns/cosa_xdns_dml.c Makes DNSSecEnable DML behavior available outside business mode by removing mode checks.
source/dmlxdns/cosa_xdns_apis.c Applies MultiProfile resolv.conf filtering/status handling for all _ONESTACK_PRODUCT_REQ_ / BCI builds, not only business mode.

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

Comment on lines 292 to 301
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (syscfg_set(NULL, "XDNS_DNSSecEnable", bval) != 0)
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", bval) != 0)
{
CcspTraceError(("[XDNS] syscfg_set XDNS_DNSSecEnable failed!\n"));
}
else
{
fprintf(stderr, "%s [XDNS] XDNS_DNSSecEnable value is set to %s in DB\n", __FUNCTION__, bval);
}
CcspTraceError(("[XDNS] syscfg_set XDNS_DNSSecEnable failed!\n"));
}
else
{
fprintf(stderr, "%s [XDNS] XDNS_DNSSecEnable value is set to %s in DB\n", __FUNCTION__, bval);
}
#endif // _CBR_PRODUCT_REQ_ || _ONESTACK_PRODUCT_REQ_
Comment on lines 634 to 643
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (syscfg_set(NULL, "XDNS_DNSSecEnable", setval) != 0)
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", setval) != 0)
{
fprintf(stderr, "%s syscfg_set XDNS_DNSSecEnable failed %d !!!\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
else
{
fprintf(stderr, "%s XDNS_DNSSecEnable value is set to %d in DB\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
fprintf(stderr, "%s syscfg_set XDNS_DNSSecEnable failed %d !!!\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
else
{
fprintf(stderr, "%s XDNS_DNSSecEnable value is set to %d in DB\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
#endif // _CBR_PRODUCT_REQ_ || _ONESTACK_PRODUCT_REQ_
Comment on lines +610 to +616
fprintf(fp2, "XDNS_Multi_Profile Enabled\n");
fprintf(stderr, "## CcspXDNS #### Multi Profile XDNS feature is Enabled\n");
}
else
{
fprintf(fp2, "XDNS_Multi_Profile Disabled\n");
fprintf(stderr, "## CcspXDNS #### Multi Profile XDNS feature is disabled\n");
Comment on lines 1727 to 1730
#if defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
{
char multiprofile_flag[5] = {0};
syscfg_get(NULL, "MultiProfileXDNS", multiprofile_flag, sizeof(multiprofile_flag));
Copilot AI review requested due to automatic review settings July 15, 2026 08:13

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

Comment on lines +634 to +638
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (syscfg_set(NULL, "XDNS_DNSSecEnable", setval) != 0)
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", setval) != 0)
{
fprintf(stderr, "%s syscfg_set XDNS_DNSSecEnable failed %d !!!\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
else
{
fprintf(stderr, "%s XDNS_DNSSecEnable value is set to %d in DB\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
fprintf(stderr, "%s syscfg_set XDNS_DNSSecEnable failed %d !!!\n", __FUNCTION__, tmp_xdns_cache->XdnsEnable);
}
Comment thread source/dmlxdns/cosa_xdns_dml.c Outdated
Comment on lines +292 to +296
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (syscfg_set(NULL, "XDNS_DNSSecEnable", bval) != 0)
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", bval) != 0)
{
CcspTraceError(("[XDNS] syscfg_set XDNS_DNSSecEnable failed!\n"));
}
else
{
fprintf(stderr, "%s [XDNS] XDNS_DNSSecEnable value is set to %s in DB\n", __FUNCTION__, bval);
}
CcspTraceError(("[XDNS] syscfg_set XDNS_DNSSecEnable failed!\n"));
}

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

Comment on lines 292 to 295
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", bval) != 0)
Comment on lines 634 to 637
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
{
if (syscfg_set(NULL, "XDNS_DNSSecEnable", setval) != 0)
Copilot AI review requested due to automatic review settings July 21, 2026 12:42

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

Comments suppressed due to low confidence (1)

source/dmlxdns/cosa_xdns_apis.c:1732

  • Same as in RefreshResolvConfEntry(): syscfg_get("MultiProfileXDNS") is unchecked, and informational logging goes directly to stderr. If syscfg access fails this will silently fall back to "Disabled" and can be noisy/unfilterable at runtime. Checking the return code and using CcspTrace* makes failures visible and keeps logs consistent.
    {
        char multiprofile_flag[5] = {0};
        syscfg_get(NULL, "MultiProfileXDNS", multiprofile_flag, sizeof(multiprofile_flag));
        if (multiprofile_flag[0] == '1' && multiprofile_flag[1] == '\0')
        {

Comment on lines +605 to 609
{
char multiprofile_flag[5] = {0};
syscfg_get(NULL, "MultiProfileXDNS", multiprofile_flag, sizeof(multiprofile_flag));
if (multiprofile_flag[0] == '1' && multiprofile_flag[1] == '\0')
{
Comment on lines 692 to 696
#if !defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
else if (!is_devicemode_business() &&
((!strncmp(xd->default_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)) && (INVALID_IP != CheckIfIpIsValid(xd->default_ipv6))) ||
((INVALID_IP != CheckIfIpIsValid(xd->default_ipv4)) && (!strncmp(xd->default_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))) ||
((!strncmp(xd->default_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))) && (!strncmp(xd->default_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))))))
#else // _ONESTACK_PRODUCT_REQ_
else if ((!strncmp(xd->default_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)) && (INVALID_IP != CheckIfIpIsValid(xd->default_ipv6))) ||
((INVALID_IP != CheckIfIpIsValid(xd->default_ipv4)) && (!strncmp(xd->default_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))) ||
((!strncmp(xd->default_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))) && (!strncmp(xd->default_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))))
#endif // _ONESTACK_PRODUCT_REQ_
{
Copilot AI review requested due to automatic review settings July 22, 2026 14:34

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 3 out of 3 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

source/dmlxdns/cosa_xdns_dml.c:643

  • These changes alter the DNSSecEnable behavior specifically for _ONESTACK_PRODUCT_REQ_ builds (removing the is_devicemode_business() gate), but the current unit-test build flags only define _CBR_PRODUCT_REQ_ (see source/test/CcspXdnsDmlTest/Makefile.am:40-44). As a result, the updated residential-vs-business behavior for ONESTACK isn’t exercised by CI unit tests.

Consider adding a unit-test build variant (or targeted tests) that compiles with _ONESTACK_PRODUCT_REQ_ and mocks is_devicemode_business() to cover both device-mode paths for DNSSecEnable get/set.

#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
        {
            char buf[5] = {0};
            if (syscfg_get(NULL, "XDNS_DNSSecEnable", buf, sizeof(buf)) == 0)
            {

Comment thread source/dmlxdns/cosa_xdns_apis.c
@apattu200
apattu200 merged commit adee34c into develop Jul 28, 2026
13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants