File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
systemvm/debian/opt/cloud/bin/cs Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def __update(self, route):
5353 logging .info ("Deleted static route %s via %s from PBR table %s" % (network , gateway , table_name ))
5454 else :
5555 # Add to main table (existing logic)
56- command = "ip route show | grep %s | awk '{print $1, $3}'" % network
56+ command = "ip route show | grep '^%s' | awk '{print $1, $3}'" % network
5757 result = CsHelper .execute (command )
5858 if not result :
5959 route_command = "ip route add %s via %s" % (network , gateway )
@@ -66,7 +66,7 @@ def __update(self, route):
6666 cs_route = CsRoute ()
6767 table_name = cs_route .get_tablename (device )
6868 # Check if route already exists in the PBR table
69- check_command = "ip route show table %s | grep %s | awk '{print $1, $3}'" % (table_name , network )
69+ check_command = "ip route show table %s | grep '^%s' | awk '{print $1, $3}'" % (table_name , network )
7070 result = CsHelper .execute (check_command )
7171 if not result :
7272 # Add route to the interface-specific table
You can’t perform that action at this time.
0 commit comments