]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Fixing ipv6 address generation
authorAshish Pant <ashish12pant@gmail.com>
Tue, 25 Jun 2019 02:00:08 +0000 (07:30 +0530)
committerAshish Pant <ashish12pant@gmail.com>
Tue, 9 Jul 2019 04:56:53 +0000 (10:26 +0530)
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
tests/topotests/lib/common_config.py

index 63fcddd836c7a91f7eba915e488fbabb950f5a72..df0b853dc503e72fe037535aab5cb6c6eab48382 100644 (file)
@@ -513,7 +513,10 @@ def generate_ips(network, no_of_ips):
         count = 0
         while count < no_of_ips:
             ipaddress_list.append("{}/{}".format(next_ip, mask))
-            next_ip += step
+            if addr_type == "ipv6":
+                next_ip = ipaddr.IPv6Address(int(next_ip) + step)
+            else:
+                next_ip += step
             count += 1
 
     return ipaddress_list