Skip to content

Commit 556d436

Browse files
committed
Merge pull request #1383 from remibergsma/slash32routefix
CLOUDSTACK-9264: Make /32 static routes for private gw workStatic routes for private gateways that were /32 failed because the `route` command used had `-net` in it and a `/32` requires `-host` instead. I rewrote it to `ip` commands. * pr/1383: CLOUDSTACK-9264: Make /32 static routes for private gw work Signed-off-by: Remi Bergsma <[email protected]>
2 parents e5ef933 + 78c4366 commit 556d436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

systemvm/patches/debian/config/opt/cloud/bin/configure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ def process(self):
8585

8686
def __update(self, route):
8787
if route['revoke']:
88-
command = "route del -net %s gw %s" % (route['network'], route['gateway'])
88+
command = "ip route del %s via %s" % (route['network'], route['gateway'])
8989
result = CsHelper.execute(command)
9090
else:
9191
command = "ip route show | grep %s | awk '{print $1, $3}'" % route['network']
9292
result = CsHelper.execute(command)
9393
if not result:
94-
route_command = "route add -net %s gw %s" % (route['network'], route['gateway'])
94+
route_command = "ip route add %s via %s" % (route['network'], route['gateway'])
9595
result = CsHelper.execute(route_command)
9696

9797

0 commit comments

Comments
 (0)