Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions source/firewall/firewall.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down
Loading