-
- self.cli(0, "lb vip 90.0.0.0/8 encap gre6")
- for asid in self.ass:
- self.cli(0, "lb as 90.0.0.0/8 2002::%u" % (asid))
-
- self.pg_add_stream(0, self.generatePackets(1))
- self.pg_enable_capture([0,1])
- self.pg_start()
-
- # Scapy fails parsing GRE over IPv6.
- # This check is therefore disabled for now.
- # One can easily patch layers/inet6.py to fix the issue.
- #self.checkCapture(0, 1)
-
- for asid in self.ass:
- self.cli(0, "lb as 90.0.0.0/8 2002::%u" % (asid))
- self.cli(0, "lb vip 90.0.0.0/8 encap gre6 del")
+ try:
+ self.vapi.cli("lb vip 90.0.0.0/8 encap gre6")
+ for asid in self.ass:
+ self.vapi.cli("lb as 90.0.0.0/8 2002::%u" % (asid))
+
+ self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True))
+ self.pg_enable_capture(self.pg_interfaces)
+ self.pg_start()
+
+ # Scapy fails parsing GRE over IPv6.
+ # This check is therefore disabled for now.
+ # One can easily patch layers/inet6.py to fix the issue.
+ # self.checkCapture(gre4=False, isv4=True)
+ finally:
+ for asid in self.ass:
+ self.vapi.cli("lb as 90.0.0.0/8 2002::%u" % (asid))
+ self.vapi.cli("lb vip 90.0.0.0/8 encap gre6 del")