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
9 changes: 9 additions & 0 deletions src/opnsense/mvc/app/views/OPNsense/Firewall/nat_rule.volt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,15 @@
if (row.isGroup) {
return "";
}

if (column.id === "local-port") {
const localPort = row["local-port"] || "";
const destinationPort = row["destination.port"] || "";
const isOmitted = !localPort || localPort === "any";
// Display "*" in case localPort and destinationPort are both omitted
return (isOmitted ? destinationPort : localPort) || "*";
}

const value = row[column.id] || "";
// DNAT uses network, SNAT and ONAT uses net
const isNegated = (row[column.id.replace(/network|net/, 'not')] == 1) ? "! " : "";
Expand Down