From 6c6a429c52a658215e91b2547aed1ed3a558568e Mon Sep 17 00:00:00 2001 From: akuduv662 Date: Mon, 23 Mar 2026 11:03:10 +0000 Subject: [PATCH] TCXB8-3928 Observed SYS_SH_IPTableFW_restart marker during stability on TXB8 devices --- source/firewall/firewall.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/source/firewall/firewall.c b/source/firewall/firewall.c index 33aed5bf..f25e0606 100644 --- a/source/firewall/firewall.c +++ b/source/firewall/firewall.c @@ -5531,8 +5531,15 @@ static int do_wan_nat_lan_clients(FILE *fp) applyHotspotPostRoutingRules(fp, true); #endif } else { - FIREWALL_DEBUG("Apply nating rules do_wan_nat_lan_clients\n"); - fprintf(fp, "-A postrouting_towan -j SNAT --to-source %s\n", natip4); + FIREWALL_DEBUG("Apply nating rules do_wan_nat_lan_clients\n"); + if (!IS_EMPTY_STRING(natip4)) + { + fprintf(fp, "-A postrouting_towan -j SNAT --to-source %s\n", natip4); + } + else + { + FIREWALL_DEBUG("natip4 is empty, skipping SNAT rule\n"); + } } #endif #if defined (FEATURE_MAPT) || defined (FEATURE_SUPPORT_MAPT_NAT46) @@ -5556,7 +5563,15 @@ static int do_wan_nat_lan_clients(FILE *fp) } else { - fprintf(fp, "-A postrouting_towan -j SNAT --to-source %s\n", natip4); + if (!IS_EMPTY_STRING(natip4)) + { + fprintf(fp, "-A postrouting_towan -j SNAT --to-source %s\n", natip4); + } + else + { + FIREWALL_DEBUG("natip4 is empty, skipping SNAT rule\n"); + } + } #endif if (isCacheActive) {