Skip to content

Commit

Permalink
RDKB-57439 : [XER10-UK] IPv6 Handling - Wan & Lan Management. (#88)
Browse files Browse the repository at this point in the history
* RDKB-57439 : [XER10-UK] IPv6 Handling - Wan & Lan Management.

Reason for change:
IPv6 Handling Requirement for Sky Products are different from Comcast. Sky using IAPD , DHCPv6 prefix delegation to provide prefixes for use on the subscriber LAN as well as to get WAN IPv6 address from backend.

The implementation for this feature is under CcspPandM components so that needs to be enable for applicable products like Sky. So we need to control RDKB_GLOBAL_PRODUCT_REQ common MACRO with feature applicable flags with respect to region.

Test Procedure:
1. IPv6 ULA should work for Sky but those params writable permission should be prohibited for comcast products.
2. WAN and LAN functionality should work without any issue.

Risks: Medium

Signed-off-by: Lakshminarayanan <[email protected]>
  • Loading branch information
LakshminarayananShenbagaraj authored Dec 19, 2024
1 parent 2037c24 commit c814c84
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 37 deletions.
5 changes: 5 additions & 0 deletions source/TR-181/include/dmsb_tr181_psm_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#define PSM_WANMANAGER_FAILOVER_TYPE "dmsb.wanmanager.FailOverType"
#define PSM_WANMANAGER_RESTORATION_DELAY "dmsb.wanmanager.RestorationDelay"
#define PSM_WANMANAGER_ALLOW_REMOTE_IFACE "dmsb.wanmanager.allowremoteinterfaces"
#define PSM_WANMANAGER_BACKUPWANDNS_SUPPORT "dmsb.wanmanager.BackupWanDnsSupport"
#define PSM_WANMANAGER_IPV6EUI64FORMAT_SUPPPORT "dmsb.wanmanager.IPv6EUI64FormatSupport"
#define PSM_WANMANAGER_CONFIGUREWANIPV6ON_LANBRIDGE_SUPPPORT "dmsb.wanmanager.ConfigureWANIPv6OnLANBridgeSupport"
#define PSM_WANMANAGER_USEWANMAC_FOR_MGMT_SERVICES "dmsb.wanmanager.UseWANMACForManagementServices"

#define PSM_WANMANAGER_GROUP_COUNT "dmsb.wanmanager.group.Count"
#define PSM_WANMANAGER_GROUP_PERSIST_SELECTED_IFACE "dmsb.wanmanager.group.%d.PersistSelectedInterface"
#define PSM_WANMANAGER_IF_NAME "dmsb.wanmanager.if.%d.Name"
Expand Down
4 changes: 4 additions & 0 deletions source/TR-181/include/wanmgr_dml.h
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@ typedef struct _DML_WANMGR_CONFIG_
CHAR CurrentStandbyInterface[BUFLEN_64];
UINT RestorationDelay;
CHAR CurrentActiveDNS[BUFLEN_256];
BOOLEAN BackupWanDnsSupport;
BOOLEAN IPv6EUI64FormatSupport;
BOOLEAN ConfigureWANIPv6OnLANBridgeSupport;
BOOLEAN UseWANMACForManagementServices;
} DML_WANMGR_CONFIG;

//WAN CONFIG
Expand Down
28 changes: 28 additions & 0 deletions source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,34 @@ ANSC_STATUS WanMgr_WanConfInit (DML_WANMGR_CONFIG* pWanConfig)

pWanConfig->RestorationDelay = wan_restoration_delay;

memset(param_name, 0, sizeof(param_name));
memset(param_value, 0, sizeof(param_value));
_ansc_sprintf(param_name, PSM_WANMANAGER_BACKUPWANDNS_SUPPORT);
retPsmGet = WanMgr_RdkBus_GetParamValuesFromDB(param_name,param_value,sizeof(param_value));
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "FALSE", 5)))
pWanConfig->BackupWanDnsSupport = FALSE;

memset(param_name, 0, sizeof(param_name));
memset(param_value, 0, sizeof(param_value));
_ansc_sprintf(param_name, PSM_WANMANAGER_IPV6EUI64FORMAT_SUPPPORT);
retPsmGet = WanMgr_RdkBus_GetParamValuesFromDB(param_name,param_value,sizeof(param_value));
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "FALSE", 5)))
pWanConfig->IPv6EUI64FormatSupport = FALSE;

memset(param_name, 0, sizeof(param_name));
memset(param_value, 0, sizeof(param_value));
_ansc_sprintf(param_name, PSM_WANMANAGER_CONFIGUREWANIPV6ON_LANBRIDGE_SUPPPORT);
retPsmGet = WanMgr_RdkBus_GetParamValuesFromDB(param_name,param_value,sizeof(param_value));
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "TRUE", 4)))
pWanConfig->ConfigureWANIPv6OnLANBridgeSupport = TRUE;

memset(param_name, 0, sizeof(param_name));
memset(param_value, 0, sizeof(param_value));
_ansc_sprintf(param_name, PSM_WANMANAGER_USEWANMAC_FOR_MGMT_SERVICES);
retPsmGet = WanMgr_RdkBus_GetParamValuesFromDB(param_name,param_value,sizeof(param_value));
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "TRUE", 4)))
pWanConfig->UseWANMACForManagementServices = TRUE;

return ret_val;
}

Expand Down
4 changes: 4 additions & 0 deletions source/WanManager/wanmgr_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ void WanMgr_SetConfigData_Default(DML_WANMGR_CONFIG* pWanDmlConfig)
pWanDmlConfig->DeviceNwMode = GATEWAY_MODE;
pWanDmlConfig->DeviceNwModeChanged = FALSE;
pWanDmlConfig->BootToWanUp = FALSE;
pWanDmlConfig->BackupWanDnsSupport = TRUE;
pWanDmlConfig->IPv6EUI64FormatSupport = TRUE;
pWanDmlConfig->ConfigureWANIPv6OnLANBridgeSupport = FALSE;
pWanDmlConfig->UseWANMACForManagementServices = FALSE;

/*In Modem/Extender Mode, CurrentActiveInterface should be always Mesh Interface Name*/
#if defined (RDKB_EXTENDER_ENABLED)
Expand Down
40 changes: 34 additions & 6 deletions source/WanManager/wanmgr_dhcpv6_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,12 +1484,26 @@ int dhcpv6_assign_global_ip(char * prefix, char * intfName, char * ipAddr)
CcspTraceError(("error, there is not '::' in prefix:%s\n", prefix));
return 1;
}
#ifdef _HUB4_PRODUCT_REQ_
if(strncmp(intfName, COSA_DML_DHCPV6_SERVER_IFNAME, strlen(intfName)) == 0)
#if defined(_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char IPv6EUI64FormatSupport = TRUE;

if( NULL != pWanConfigData )
{
snprintf(ipAddr, 128, "%s1", globalIP);
CcspTraceInfo(("the full part is:%s\n", ipAddr));
return 0;
IPv6EUI64FormatSupport = pWanConfigData->data.IPv6EUI64FormatSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( FALSE == IPv6EUI64FormatSupport )
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
{
if(strncmp(intfName, COSA_DML_DHCPV6_SERVER_IFNAME, strlen(intfName)) == 0)
{
snprintf(ipAddr, 128, "%s1", globalIP);
CcspTraceInfo(("the full part is:%s\n", ipAddr));
return 0;
}
}
#endif

Expand Down Expand Up @@ -1890,13 +1904,27 @@ ANSC_STATUS wanmgr_handle_dhcpv6_event_data(DML_VIRTUAL_IFACE * pVirtIf)
{
if(pVirtIf->Status == WAN_IFACE_STATUS_UP && pNewIpcMsg->prefixPltime > 0 && pNewIpcMsg->prefixVltime > 0 ) //Update life time only if the interface is active.
{
#if !(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_)) //Do not add prefix on LAN bridge for the Comcast platforms.
#if !(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_)) || defined(_RDKB_GLOBAL_PRODUCT_REQ_) //Do not add prefix on LAN bridge for the Comcast platforms.
#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char ConfigureWANIPv6OnLANBridgeSupport = FALSE;

if( NULL != pWanConfigData )
{
ConfigureWANIPv6OnLANBridgeSupport = pWanConfigData->data.ConfigureWANIPv6OnLANBridgeSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( TRUE == ConfigureWANIPv6OnLANBridgeSupport )
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
{
//call function for changing the prlft and vallft
if ((WanManager_Ipv6AddrUtil(pVirtIf->Name, SET_LFT, pNewIpcMsg->prefixPltime, pNewIpcMsg->prefixVltime) < 0))
{
CcspTraceError(("Life Time Setting Failed"));
}
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_RADVD_RESTART, NULL, 0);
}
#endif
}
pVirtIf->IP.Ipv6Renewed = TRUE;
Expand Down
102 changes: 84 additions & 18 deletions source/WanManager/wanmgr_interface_sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,19 +1255,35 @@ static int wan_tearDownIPv4(WanMgr_IfaceSM_Controller_t * pWanIfaceCtrl)
DML_VIRTUAL_IFACE* p_VirtIf = WanMgr_getVirtualIfaceById(pInterface->VirtIfList, pWanIfaceCtrl->VirIfIdx);

/** Reset IPv4 DNS configuration. */
#if (defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_))
#if (defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_) || defined (_RDKB_GLOBAL_PRODUCT_REQ_))
#if defined (_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char BackupWanDnsSupport = TRUE;

if( NULL != pWanConfigData )
{
BackupWanDnsSupport = pWanConfigData->data.BackupWanDnsSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( ( FALSE == BackupWanDnsSupport ) &&
(p_VirtIf->MAP.MaptStatus == WAN_IFACE_MAPT_STATE_UP && strstr(pInterface->BaseInterface, "Ethernet") == NULL) )
#else
//TODO: XB devices use the DNS of primary for backup interfaces. Clear V4 DNS only if MAPT is up
/* FIXME: Issue in DNS ipv6 resolution when ethwan enabled *//* Workaround: We keep the ipv4 entries for name resolution */
if(p_VirtIf->MAP.MaptStatus == WAN_IFACE_MAPT_STATE_UP && strstr(pInterface->BaseInterface, "Ethernet") == NULL)
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
#endif
if (RETURN_OK != wan_updateDNS(pWanIfaceCtrl, FALSE, (p_VirtIf->IP.Ipv6Status == WAN_IFACE_IPV6_STATE_UP)))
{
CcspTraceError(("%s %d - Failed to unconfig IPv4 DNS servers \n", __FUNCTION__, __LINE__));
ret = RETURN_ERR;
}
else
{
CcspTraceInfo(("%s %d - IPv4 DNS servers unconfig successfully \n", __FUNCTION__, __LINE__));
if (RETURN_OK != wan_updateDNS(pWanIfaceCtrl, FALSE, (p_VirtIf->IP.Ipv6Status == WAN_IFACE_IPV6_STATE_UP)))
{
CcspTraceError(("%s %d - Failed to unconfig IPv4 DNS servers \n", __FUNCTION__, __LINE__));
ret = RETURN_ERR;
}
else
{
CcspTraceInfo(("%s %d - IPv4 DNS servers unconfig successfully \n", __FUNCTION__, __LINE__));
}
}

if (WanManager_DelDefaultGatewayRoute(DeviceNwMode, pWanIfaceCtrl->DeviceNwModeChanged, &p_VirtIf->IP.Ipv4Data) != RETURN_OK)
Expand Down Expand Up @@ -1372,13 +1388,27 @@ static int wan_setUpIPv6(WanMgr_IfaceSM_Controller_t * pWanIfaceCtrl)
}
wanmgr_services_restart();

#if !defined (_XB6_PRODUCT_REQ_) && !defined (_CBR2_PRODUCT_REQ_) && !defined(_PLATFORM_RASPBERRYPI_) //parodus uses cmac for xb platforms
#if (!defined (_XB6_PRODUCT_REQ_) && !defined (_CBR2_PRODUCT_REQ_) && !defined(_PLATFORM_RASPBERRYPI_)) || defined (_RDKB_GLOBAL_PRODUCT_REQ_) //parodus uses cmac for xb platforms
#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char UseWANMACForManagementServices = FALSE;

if( NULL != pWanConfigData )
{
UseWANMACForManagementServices = pWanConfigData->data.UseWANMACForManagementServices;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( TRUE == UseWANMACForManagementServices )
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
{
// set wan mac because parodus depends on it to start.
if(ANSC_STATUS_SUCCESS == WanManager_get_interface_mac(p_VirtIf->IP.Ipv6Data.ifname, ifaceMacAddress, sizeof(ifaceMacAddress)))
{
CcspTraceInfo(("%s %d - setting sysevent eth_wan_mac = [%s] \n", __FUNCTION__, __LINE__, ifaceMacAddress));
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_ETH_WAN_MAC, ifaceMacAddress, 0);
}
}
#endif
}

Expand All @@ -1397,23 +1427,40 @@ static int wan_tearDownIPv6(WanMgr_IfaceSM_Controller_t * pWanIfaceCtrl)

int ret = RETURN_OK;
char buf[BUFLEN_32] = {0};
#if defined (_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = NULL;
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */

DML_WAN_IFACE * pInterface = pWanIfaceCtrl->pIfaceData;
DML_VIRTUAL_IFACE* p_VirtIf = WanMgr_getVirtualIfaceById(pInterface->VirtIfList, pWanIfaceCtrl->VirIfIdx);

//TODO: FIXME: XB devices use the DNS of primary for backup and doesn't deconfigure the primary ipv6 prefix from the LAN interface.
#if !(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_))
/** Reset IPv6 DNS configuration. */
if (RETURN_OK == wan_updateDNS(pWanIfaceCtrl, (p_VirtIf->IP.Ipv4Status == WAN_IFACE_IPV4_STATE_UP), FALSE))
#if (!(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_))) || defined (_RDKB_GLOBAL_PRODUCT_REQ_)
#if defined (_RDKB_GLOBAL_PRODUCT_REQ_)
unsigned char BackupWanDnsSupport = TRUE;

pWanConfigData = WanMgr_GetConfigData_locked();
if( NULL != pWanConfigData )
{
CcspTraceInfo(("%s %d - IPv6 DNS servers unconfig successfully \n", __FUNCTION__, __LINE__));
BackupWanDnsSupport = pWanConfigData->data.BackupWanDnsSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
pWanConfigData = NULL;
}
else

if ( FALSE == BackupWanDnsSupport )
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
{
CcspTraceError(("%s %d - Failed to unconfig IPv6 DNS servers \n", __FUNCTION__, __LINE__));
ret = RETURN_ERR;
/** Reset IPv6 DNS configuration. */
if (RETURN_OK == wan_updateDNS(pWanIfaceCtrl, (p_VirtIf->IP.Ipv4Status == WAN_IFACE_IPV4_STATE_UP), FALSE))
{
CcspTraceInfo(("%s %d - IPv6 DNS servers unconfig successfully \n", __FUNCTION__, __LINE__));
}
else
{
CcspTraceError(("%s %d - Failed to unconfig IPv6 DNS servers \n", __FUNCTION__, __LINE__));
ret = RETURN_ERR;
}
}

#endif
/** Unconfig IPv6. */
if ( WanManager_Ipv6AddrUtil(p_VirtIf->Name, DEL_ADDR,0,0) < 0)
Expand Down Expand Up @@ -1443,7 +1490,26 @@ static int wan_tearDownIPv6(WanMgr_IfaceSM_Controller_t * pWanIfaceCtrl)

//RBUS_WAN_IP
#if defined (RBUS_WAN_IP)
#if defined (_HUB4_PRODUCT_REQ_) || defined (_SR213_PRODUCT_REQ_)
#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
unsigned char ConfigureWANIPv6OnLANBridgeSupport = FALSE;

pWanConfigData = WanMgr_GetConfigData_locked();
if( NULL != pWanConfigData )
{
ConfigureWANIPv6OnLANBridgeSupport = pWanConfigData->data.ConfigureWANIPv6OnLANBridgeSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
pWanConfigData = NULL;
}

if ( TRUE == ConfigureWANIPv6OnLANBridgeSupport )
{
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_LAN_IPV6_ADDRESS, "::", 0);
}
else
{
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_IPV6_WAN_ADDRESS, "::", 0);
}
#elif defined (_HUB4_PRODUCT_REQ_) || defined (_SR213_PRODUCT_REQ_)
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_LAN_IPV6_ADDRESS, "::", 0);
#else
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_IPV6_WAN_ADDRESS, "::", 0);
Expand Down
24 changes: 19 additions & 5 deletions source/WanManager/wanmgr_net_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,25 @@ int WanManager_Ipv6AddrUtil(char *ifname, Ipv6OperType opr, int preflft, int val
{
if (strlen(prefix) > 0)
{
#if !(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_)) //Do not delete prefix from LAn bridge for the comcast platforms.
memset(cmdLine, 0, sizeof(cmdLine));
snprintf(cmdLine, sizeof(cmdLine), "ip -6 addr del %s/64 dev %s", prefixAddr, IfaceName);
if (WanManager_DoSystemActionWithStatus("ip -6 addr del ADDR dev xxxx", cmdLine) != 0)
CcspTraceError(("failed to run cmd: %s", cmdLine));
#if !(defined (_XB6_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) || defined(_PLATFORM_RASPBERRYPI_)) || defined(_RDKB_GLOBAL_PRODUCT_REQ_) //Do not delete prefix from LAn bridge for the comcast platforms.
#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char ConfigureWANIPv6OnLANBridgeSupport = FALSE;

if( NULL != pWanConfigData )
{
ConfigureWANIPv6OnLANBridgeSupport = pWanConfigData->data.ConfigureWANIPv6OnLANBridgeSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( TRUE == ConfigureWANIPv6OnLANBridgeSupport )
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */
{
memset(cmdLine, 0, sizeof(cmdLine));
snprintf(cmdLine, sizeof(cmdLine), "ip -6 addr del %s/64 dev %s", prefixAddr, IfaceName);
if (WanManager_DoSystemActionWithStatus("ip -6 addr del ADDR dev xxxx", cmdLine) != 0)
CcspTraceError(("failed to run cmd: %s", cmdLine));
}
#endif
memset(cmdLine, 0, sizeof(cmdLine));
#if defined(FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE)
Expand Down
30 changes: 22 additions & 8 deletions source/WanManager/wanmgr_sysevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,26 @@ ANSC_STATUS wanmgr_set_Ipv4Sysevent(const WANMGR_IPV4_DATA* dhcp4Info, DEVICE_NE
}
sysevent_set(sysevent_fd, sysevent_token,name, dhcp4Info->ip, 0);

#if !defined (_XB6_PRODUCT_REQ_) && !defined (_CBR2_PRODUCT_REQ_) //parodus uses cmac for xb platforms
// set wan mac because parodus depends on it to start.
if(ANSC_STATUS_SUCCESS == WanManager_get_interface_mac(dhcp4Info->ifname, ifaceMacAddress, sizeof(ifaceMacAddress)))
#if (!defined (_XB6_PRODUCT_REQ_) && !defined (_CBR2_PRODUCT_REQ_)) || defined (_RDKB_GLOBAL_PRODUCT_REQ_) //parodus uses cmac for xb platforms
#if defined (_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char UseWANMACForManagementServices = FALSE;

if( NULL != pWanConfigData )
{
CcspTraceInfo(("%s %d - setting sysevent eth_wan_mac = [%s] \n", __FUNCTION__, __LINE__, ifaceMacAddress));
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_ETH_WAN_MAC, ifaceMacAddress, 0);
UseWANMACForManagementServices = pWanConfigData->data.UseWANMACForManagementServices;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if ( TRUE == UseWANMACForManagementServices )
#endif /* _RDKB_GLOBAL_PRODUCT_REQ_ */
{
// set wan mac because parodus depends on it to start.
if(ANSC_STATUS_SUCCESS == WanManager_get_interface_mac(dhcp4Info->ifname, ifaceMacAddress, sizeof(ifaceMacAddress)))
{
CcspTraceInfo(("%s %d - setting sysevent eth_wan_mac = [%s] \n", __FUNCTION__, __LINE__, ifaceMacAddress));
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_ETH_WAN_MAC, ifaceMacAddress, 0);
}
}
#endif

Expand Down Expand Up @@ -603,7 +617,7 @@ static void *WanManagerSyseventHandler(void *args)
#endif
#endif

#if defined (_HUB4_PRODUCT_REQ_)
#if defined (_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
sysevent_set_options(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_ULA_ADDRESS, TUPLE_FLAG_EVENT);
sysevent_setnotification(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_ULA_ADDRESS, &lan_ula_address_event_asyncid);

Expand Down Expand Up @@ -705,7 +719,7 @@ static void *WanManagerSyseventHandler(void *args)
CcspTraceInfo(("%s %d - received notification event %s:%s\n", __FUNCTION__, __LINE__, name, val ));
if ( strcmp(name, SYSEVENT_ULA_ADDRESS) == 0 )
{
#if defined (_HUB4_PRODUCT_REQ_)
#if defined (_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
datamodel_value = (char *) malloc(sizeof(char) * 256);
if(datamodel_value != NULL)
{
Expand Down Expand Up @@ -733,7 +747,7 @@ static void *WanManagerSyseventHandler(void *args)
}
else if ( strcmp(name, SYSEVENT_ULA_ENABLE) == 0 )
{
#if defined (_HUB4_PRODUCT_REQ_)
#if defined (_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
datamodel_value = (char *) malloc(sizeof(char) * 256);
if(datamodel_value != NULL)
{
Expand Down

0 comments on commit c814c84

Please sign in to comment.