From aa7551501b5748593c28e0c64befe24c48de2ca6 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 1/8] Added marker to track the disassociated client after DHCP failure --- source/hotspotfd/dhcpsnooper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index a51d7f0..f4df0fe 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1238,6 +1238,8 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m constructCommand(mac_str, macaddr_with_index); if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { + //added marker to track the dissociated client upon DHCP failure + CcspTraceInfo(("DHCP FAILED AND CLIENT DISASSOCIATED\n")); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From 2d267678f57a06380e53634b089ffb24b326536f Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 2/8] Added marker to track the disassociated client after DHCP failure --- source/hotspotfd/dhcpsnooper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index f4df0fe..209153f 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1238,8 +1238,8 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m constructCommand(mac_str, macaddr_with_index); if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { - //added marker to track the dissociated client upon DHCP failure - CcspTraceInfo(("DHCP FAILED AND CLIENT DISASSOCIATED\n")); + //Added marker to track the dissociated client upon DHCP failure + CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED\n")); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From c2f47a0368e832c99040725672a5e394537bc5a3 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 3/8] Added marker to track the disassociated client after DHCP failure --- source/hotspotfd/dhcpsnooper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index 209153f..a89c259 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1239,7 +1239,7 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { //Added marker to track the dissociated client upon DHCP failure - CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED\n")); + CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED-%s\n",mac_str)); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From cbda51586582b9136d06649b4ff1b22d2dc62b75 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 4/8] RDKCOM-5639:Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Reason for change: Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Test Procedure: 1.Change the endpoint ip address and make sure Wag doen't respond to DHCP discover. dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 75.75.75.75 dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 75.75.76.76 2. Verify Marker string is logged in /rdklogs/logs/Hotspotlog.txt.0 file if hotspot client doesn't get the ip from WAG Risks : None Priority : P2 --- source/hotspotfd/dhcpsnooper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index a89c259..bf93176 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1238,8 +1238,8 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m constructCommand(mac_str, macaddr_with_index); if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { - //Added marker to track the dissociated client upon DHCP failure - CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED-%s\n",mac_str)); + //Added marker to track the disassociated client upon DHCP failure + CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED:%s\n",mac_str)); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From bc44a716cfcb3c5c5858c9532df1bd88f1fc2621 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 5/8] RDKCOM-5639:Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Reason for change: Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Test Procedure: 1.Change the endpoint ip address and make sure Wag doen't respond to DHCP discover. dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 75.75.75.75 dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 75.75.76.76 2. Verify Marker string is logged in /rdklogs/logs/Hotspotlog.txt.0 file if hotspot client doesn't get the ip from WAG Risks : None Priority : P2 --- source/hotspotfd/dhcpsnooper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index bf93176..ae0a05a 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1239,7 +1239,7 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { //Added marker to track the disassociated client upon DHCP failure - CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED:%s\n",mac_str)); + CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED: %s\n",mac_str)); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From 0f5b6700683065d0ac9a9df4f71a223b65aa2230 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 6/8] RDKCOM-5639:Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Reason for change: Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Test Procedure: 1.Change the endpoint ip address and make sure Wag doen't respond to DHCP discover. dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 75.75.75.75 dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 75.75.76.76 2. Verify Marker string is logged in /rdklogs/logs/Hotspotlog.txt.0 file if hotspot client doesn't get the ip from WAG Risks : None Priority : P2 --- source/hotspotfd/dhcpsnooper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/hotspotfd/dhcpsnooper.c b/source/hotspotfd/dhcpsnooper.c index ae0a05a..ae231bf 100644 --- a/source/hotspotfd/dhcpsnooper.c +++ b/source/hotspotfd/dhcpsnooper.c @@ -1238,8 +1238,11 @@ static int snoop_packetHandler(struct nfq_q_handle * myQueue, struct nfgenmsg *m constructCommand(mac_str, macaddr_with_index); if (macaddr_with_index[0] != '\0' && publish_to_onewifi(macaddr_with_index)) { + char telemetry_buf[18] = {'\0'}; //Added marker to track the disassociated client upon DHCP failure CcspTraceInfo(("DHCP_FAILED_AND_CLIENT_DISASSOCIATED: %s\n",mac_str)); + snprintf(telemetry_buf, sizeof(telemetry_buf), "%s", mac_str); + t2_event_s("DHCP_FAILED_AND_CLIENT_DISASSOCIATED", telemetry_buf); msg_debug("DHCP ACK not received for client MAC.Publising RBus event Timer stopped. Time elapsed: %ld s - line %d\n", (elapsed_time/1000), __LINE__); } From 00551f837645d6b705fad0122a662d9c8a66924a Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Thu, 3 Sep 2026 13:54:27 -0400 Subject: [PATCH 7/8] RDKCOM-5639:Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Reason for change: Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure Test Procedure: 1.Change the endpoint ip address and make sure Wag doen't respond to DHCP discover. dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.PrimaryRemoteEndpoint string 75.75.75.75 dmcli eRT setv Device.X_COMCAST-COM_GRE.Tunnel.1.SecondaryRemoteEndpoint string 75.75.76.76 2. Verify Marker string is logged in /rdklogs/logs/Hotspotlog.txt.0 file if hotspot client doesn't get the ip from WAG Risks : None Priority : P2 --- source/test/HotspotFdTest/HotspotFdTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/test/HotspotFdTest/HotspotFdTest.cpp b/source/test/HotspotFdTest/HotspotFdTest.cpp index 380fbad..99d1088 100755 --- a/source/test/HotspotFdTest/HotspotFdTest.cpp +++ b/source/test/HotspotFdTest/HotspotFdTest.cpp @@ -1138,6 +1138,16 @@ TEST_F(HotspotFdTestFixture, publish_to_onewifi_PublishFails) { EXPECT_EQ(0, result); } +TEST_F(HotspotFdTestFixture, DhcpFailureDisassociationReportsClientMac) { + const char marker[] = "DHCP_FAILED_AND_CLIENT_DISASSOCIATED"; + const char mac[] = "aa:bb:cc:dd:ee:ff"; + + EXPECT_CALL(*g_telemetryMock, t2_event_s(StrEq(marker), StrEq(mac))) + .WillOnce(Return(T2ERROR_SUCCESS)); + + EXPECT_EQ(T2ERROR_SUCCESS, t2_event_s(marker, mac)); +} + // ========================================== // Testcases for DHCP timer state logic // ========================================== From ca3ec7c909916187683b3ae742f31fd3585c0aa3 Mon Sep 17 00:00:00 2001 From: rhegde114 Date: Tue, 15 Sep 2026 15:18:07 -0400 Subject: [PATCH 8/8] Revert "RDKCOM-5639:Add a marker string to monitor Disassociated Hotspot clients due to DHCP failure" This reverts commit 00551f837645d6b705fad0122a662d9c8a66924a. --- source/test/HotspotFdTest/HotspotFdTest.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/source/test/HotspotFdTest/HotspotFdTest.cpp b/source/test/HotspotFdTest/HotspotFdTest.cpp index 99d1088..380fbad 100755 --- a/source/test/HotspotFdTest/HotspotFdTest.cpp +++ b/source/test/HotspotFdTest/HotspotFdTest.cpp @@ -1138,16 +1138,6 @@ TEST_F(HotspotFdTestFixture, publish_to_onewifi_PublishFails) { EXPECT_EQ(0, result); } -TEST_F(HotspotFdTestFixture, DhcpFailureDisassociationReportsClientMac) { - const char marker[] = "DHCP_FAILED_AND_CLIENT_DISASSOCIATED"; - const char mac[] = "aa:bb:cc:dd:ee:ff"; - - EXPECT_CALL(*g_telemetryMock, t2_event_s(StrEq(marker), StrEq(mac))) - .WillOnce(Return(T2ERROR_SUCCESS)); - - EXPECT_EQ(T2ERROR_SUCCESS, t2_event_s(marker, mac)); -} - // ========================================== // Testcases for DHCP timer state logic // ==========================================