Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 18 additions & 39 deletions source/dmlxdns/cosa_xdns_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,14 +533,9 @@ void RefreshResolvConfEntry()
}

#if defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (strstr(resolvConfEntry, "XDNS_Multi_Profile"))
{
if (strstr(resolvConfEntry, "XDNS_Multi_Profile"))
{
continue;
}
continue;
}
Comment thread
apattu200 marked this conversation as resolved.
#endif // _COSA_FOR_BCI_ || _ONESTACK_PRODUCT_REQ_

Expand Down Expand Up @@ -607,23 +602,20 @@ void RefreshResolvConfEntry()
}

#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));
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')
{
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");
}
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 +610 to +616
}
}
#endif // _COSA_FOR_BCI_ || _ONESTACK_PRODUCT_REQ_

// at this point the temp file has entries from resolv.conf and dnsmasq_server.conf
Expand Down Expand Up @@ -1633,14 +1625,9 @@ int SetXdnsConfig()
}

#if defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (strstr(confEntry, "XDNS_Multi_Profile"))
{
if (strstr(confEntry, "XDNS_Multi_Profile"))
{
continue;
}
continue;
}
#endif // _COSA_FOR_BCI_ || _ONESTACK_PRODUCT_REQ_

Expand Down Expand Up @@ -1738,9 +1725,6 @@ int SetXdnsConfig()
}

#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));
Comment on lines 1727 to 1730
Expand Down Expand Up @@ -1865,14 +1849,9 @@ int UnsetXdnsConfig()
}

#if defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
if (strstr(confEntry, "XDNS_Multi_Profile"))
{
if (strstr(confEntry, "XDNS_Multi_Profile"))
{
continue;
}
continue;
}
#endif // _COSA_FOR_BCI_ || _ONESTACK_PRODUCT_REQ_

Expand Down
14 changes: 0 additions & 14 deletions source/dmlxdns/cosa_xdns_dml.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,9 +637,6 @@ XDNS_GetParamBoolValue
if((!ind) && (rc == EOK))
{
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
{
char buf[5] = {0};
if (syscfg_get(NULL, "XDNS_DNSSecEnable", buf, sizeof(buf)) == 0)
Expand Down Expand Up @@ -682,9 +679,6 @@ XDNS_SetParamBoolValue
if((!ind) && (rc == EOK))
{
#if defined(_CBR_PRODUCT_REQ_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if (is_devicemode_business())
#endif // _ONESTACK_PRODUCT_REQ_
{
char bval[2] = {0};
if (bValue == TRUE)
Expand Down Expand Up @@ -714,14 +708,6 @@ XDNS_SetParamBoolValue
}
return TRUE;
}
#if defined(_ONESTACK_PRODUCT_REQ_)
if (!is_devicemode_business())
{
CcspTraceInfo(("[XDNS] DNSSec feature not supported in residential mode\n"));
t2_event_d("XDNS_DNSSec_NotSupported", 1);
return FALSE;
}
#endif // _ONESTACK_PRODUCT_REQ_
#endif // _CBR_PRODUCT_REQ_ || _ONESTACK_PRODUCT_REQ_
}

Expand Down
14 changes: 0 additions & 14 deletions source/dmlxdns/cosa_xdns_webconfig_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,16 +690,9 @@ int set_xdns_conf(xdnsdoc_t *xd, xdns_cache *tmp_xdns_cache)
}
}
#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_
{
Comment on lines 692 to 696
ret = xdns_read_load_dns_ip(xd->default_ipv4, xd->default_ipv6, tmp_xdns_cache->DefaultDeviceDnsIPv4, tmp_xdns_cache->DefaultDeviceDnsIPv6);
if (0 != ret)
Expand Down Expand Up @@ -777,17 +770,10 @@ int set_xdns_conf(xdnsdoc_t *xd, xdns_cache *tmp_xdns_cache)
}
}
#if defined(_COSA_FOR_BCI_) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
else if (is_devicemode_business() &&
((!strncmp(xd->table_param->entries[i].dns_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)) && (INVALID_IP != CheckIfIpIsValid(xd->table_param->entries[i].dns_ipv6))) ||
((INVALID_IP != CheckIfIpIsValid(xd->table_param->entries[i].dns_ipv4)) && (!strncmp(xd->table_param->entries[i].dns_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))) ||
((!strncmp(xd->table_param->entries[i].dns_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))) && (!strncmp(xd->table_param->entries[i].dns_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))))))
#else // _ONESTACK_PRODUCT_REQ_
else if (
(!strncmp(xd->table_param->entries[i].dns_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)) && (INVALID_IP != CheckIfIpIsValid(xd->table_param->entries[i].dns_ipv6))) ||
((INVALID_IP != CheckIfIpIsValid(xd->table_param->entries[i].dns_ipv4)) && (!strncmp(xd->table_param->entries[i].dns_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))) ||
((!strncmp(xd->table_param->entries[i].dns_ipv4, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING))) && (!strncmp(xd->table_param->entries[i].dns_ipv6, USE_RDK_DEFAULT_STRING, sizeof(USE_RDK_DEFAULT_STRING)))))
#endif // _ONESTACK_PRODUCT_REQ_
{
ret = xdns_read_load_dns_ip(xd->table_param->entries[i].dns_ipv4, xd->table_param->entries[i].dns_ipv6, tmp_xdns_cache->XDNSTableList[i].DnsIPv4, tmp_xdns_cache->XDNSTableList[i].DnsIPv6);
if (0 != ret)
Expand Down
Loading