From 2c4e66ec6215d6d92bec04cba69cbe402d9e1630 Mon Sep 17 00:00:00 2001 From: Sherik Sensin Date: Mon, 6 Jul 2026 15:48:57 +0200 Subject: [PATCH] RDKBNETWOR-98 : Support for untagged VLAN Reason for change: CPE should be able to support IP connectivity(Static/PPPoE/IPoE) over native interface. Test Procedure: Performed VlanManager Sanity test. Risks: None. Signed-off-by: Sherik Sensin A --- source/TR-181/middle_layer_src/vlan_apis.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/source/TR-181/middle_layer_src/vlan_apis.c b/source/TR-181/middle_layer_src/vlan_apis.c index 395de97..708f09d 100644 --- a/source/TR-181/middle_layer_src/vlan_apis.c +++ b/source/TR-181/middle_layer_src/vlan_apis.c @@ -402,6 +402,17 @@ void * Vlan_Disable(void *Arg) Vlan_DeleteInterface(pEntry); #endif } + else if (pEntry->VLANId == -1) + { + /* If the VLANID = -1, the VLAN is a bridge, delete the bridge and delete the interface from the bridge */ + if(strcmp(pEntry->BaseInterface, pEntry->Name)) + { + v_secure_system("ifconfig %s down", pEntry->Name); + v_secure_system("brctl delif %s %s", pEntry->Name, pEntry->BaseInterface); + v_secure_system("brctl delbr %s", pEntry->Name); + } + } + pEntry->Status = VLAN_IF_DOWN; EthLink_SendVirtualIfaceVlanStatus(pEntry->Path, "Down"); CcspTraceInfo(("%s - %s:Successfully deleted VLAN interface %s\n", __FUNCTION__, VLAN_MARKER_VLAN_IF_CREATE, pEntry->Name)); @@ -659,6 +670,16 @@ void * Vlan_Enable(void *Arg) get_uptime(&uptime); pEntry->LastChange = uptime; } + else if (pEntry->VLANId == -1) + { + /* If the VLANID = -1, the VLAN is a bridge, create the bridge and add the interface to the bridge */ + if(strcmp(pEntry->BaseInterface, pEntry->Name)) + { + v_secure_system("brctl addbr %s", pEntry->Name); + v_secure_system("brctl addif %s %s", pEntry->Name, pEntry->BaseInterface); + v_secure_system("ifconfig %s up", pEntry->Name); + } + } else { //Enable EthLink and it will take care Creation of UnTagged Vlan Interface.