Skip to content

Commit 5e94bdb

Browse files
author
Andres D. Molins
committed
Fix: Ensure port typings adding redirect rules.
1 parent b4cc679 commit 5e94bdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/aleph/vm/network/firewall.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,11 @@ def add_port_redirect_rule(
621621
"match": {
622622
"op": "==",
623623
"left": {"payload": {"protocol": protocol, "field": "dport"}},
624-
"right": host_port,
624+
"right": int(host_port),
625625
}
626626
},
627627
{
628-
"dnat": {"addr": str(interface.guest_ip.ip), "port": vm_port},
628+
"dnat": {"addr": str(interface.guest_ip.ip), "port": int(vm_port)},
629629
},
630630
],
631631
}
@@ -648,7 +648,7 @@ def add_port_redirect_rule(
648648
"match": {
649649
"op": "==",
650650
"left": {"payload": {"protocol": protocol, "field": "dport"}},
651-
"right": vm_port,
651+
"right": int(vm_port),
652652
}
653653
},
654654
{"accept": None},

0 commit comments

Comments
 (0)