fix gateway ip

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-04-10 00:06:14 +02:00
commit 9b060eaf34
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ function start_vm {
#bash agent.sh StartVm -c vpc-00000 -s subnet-00000 -v 12 -g 240.0.0.1 -n 240.0.0.0 -e 16 -m i-00000 -p 240.0.1.1
local local_ip=$(ip a show dev ${FLAGS_interface} | grep 'inet ' | sed -e 's/ */ /g' |cut -d\ -f 3|cut -d\/ -f1)
local gateway_ip="${FLAGS_gateway_ip}/32"
local gateway_ip="${FLAGS_gateway_ip}"
local subnet="${FLAGS_network}/${FLAGS_netmask}"
local vm_ip="${FLAGS_vm_ip}/${FLAGS_netmask}"

View file

@ -75,7 +75,7 @@ function create_subnet {
print_in_color "${COLOR_GREEN}" " - add subnet ip"
ip -n "${vpc_name}" a add "${gateway_ip}" dev "br-${subnet_id}"
ip -n "${vpc_name}" a add "${gateway_ip}/32" dev "br-${subnet_id}"
print_in_color "${COLOR_GREEN}" " - add subnet route"
ip -n "${vpc_name}" r add "${subnet}" dev "br-${subnet_id}" scope link
print_in_color "${COLOR_GREEN}" " - add subnet firewall"