diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-12-24 12:23:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-24 12:23:26 +0200 |
commit | 111da0019bd6dd0f418e7aba77de49876b873389 (patch) | |
tree | f11ccdf29a76cb6944fb51f59a8cf5b3d42925e9 /src/conf_mode/nat64.py | |
parent | 04e24e89623620466b56b432c36f727768e5dcb7 (diff) | |
parent | cd3cfd2ad5c3201b0a1f9acc283ba2631420e723 (diff) | |
download | vyos-1x-111da0019bd6dd0f418e7aba77de49876b873389.tar.gz vyos-1x-111da0019bd6dd0f418e7aba77de49876b873389.zip |
Merge pull request #2681 from vyos/mergify/bp/sagitta/pr-2677
T160: NAT64 add match firewall mark feature (backport #2677)
Diffstat (limited to 'src/conf_mode/nat64.py')
-rwxr-xr-x | src/conf_mode/nat64.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/nat64.py b/src/conf_mode/nat64.py index a8b90fb11..6026c61d0 100755 --- a/src/conf_mode/nat64.py +++ b/src/conf_mode/nat64.py @@ -148,6 +148,11 @@ def generate(nat64) -> None: if dict_search("translation.pool", instance): pool4 = [] + # mark + mark = '' + if dict_search("match.mark", instance): + mark = instance["match"]["mark"] + for pool in instance["translation"]["pool"].values(): if "disable" in pool: continue @@ -159,6 +164,8 @@ def generate(nat64) -> None: "prefix": pool["address"], "port range": pool["port"], } + if mark: + obj["mark"] = int(mark) if "description" in pool: obj["comment"] = pool["description"] |