From a3d1a35e2f323694ce824230cc8f735189c0e166 Mon Sep 17 00:00:00 2001 From: bloqaudio Date: Mon, 17 Aug 2026 12:17:42 -0500 Subject: [PATCH] httpd: read the static flag of an L2 entry from the byte that holds it The MAC table listing tests bit 0 of byte 2 of the third table data word for the static flag, but the flag lives in bit 0 of byte 1: an entry written with byte 1 bit 0 set survives the aging engine indefinitely where an identical entry without it ages out, and reads back with exactly that bit set through both the address and the next-entry read methods. Byte 2 of that word reads zero for learned and static entries alike, so every entry has always been listed as learned and a static entry has never been visible as such in the table listing. --- httpd/page_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpd/page_impl.c b/httpd/page_impl.c index bf3e268..4d3b90f 100644 --- a/httpd/page_impl.c +++ b/httpd/page_impl.c @@ -397,7 +397,7 @@ void send_l2(uint16_t idx) // type reg_read_m(RTL837x_L2_DATA_OUT_C); - if (sfr_data[2] & 0x1) + if (sfr_data[1] & 0x1) slen += strtox(outbuf + slen, "\",\"type\":\"s\",\"port\":"); else slen += strtox(outbuf + slen, "\",\"type\":\"l\",\"port\":");