diff options
author | Klement Sekera <ksekera@cisco.com> | 2016-12-18 15:49:54 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-19 21:33:42 +0000 |
commit | 65cc8c0dbf04f2418200e682caeae9c1e7396e10 (patch) | |
tree | 2ab9014753fd24cd197a3c52d7fb00cc2959315b /test/test_lb.py | |
parent | 72d0916b82901496bed2f0cebf0cfc9968d239d4 (diff) |
make test: filter IPv6 RAs out by default
Most of the test cases are not interested in IPv6 Router Alerts,
so change the default behaviour of get_capture to filter out
these packets with the possibility of turning the filtering off,
for test cases which are interested in the RAs.
Change-Id: I0b5ee685f82c49cd32c6d6a4638eb3493d2988fc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/test_lb.py')
-rw-r--r-- | test/test_lb.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/test/test_lb.py b/test/test_lb.py index 7037d80c571..9b5baaea132 100644 --- a/test/test_lb.py +++ b/test/test_lb.py @@ -1,7 +1,7 @@ import socket from scapy.layers.inet import IP, UDP -from scapy.layers.inet6 import ICMPv6ND_RA, IPv6 +from scapy.layers.inet6 import IPv6 from scapy.layers.l2 import Ether, GRE from scapy.packet import Raw @@ -95,16 +95,7 @@ class TestLB(VppTestCase): self.assertEqual(str(inner), str(self.info.data[IPver])) def checkCapture(self, gre4, isv4): - # RA might appear in capture - try: - out = self.pg0.get_capture() - # filter out any IPv6 RAs from the capture - for p in out: - if (p.haslayer(ICMPv6ND_RA)): - out.remove(p) - self.assertEqual(len(out), 0) - except: - pass + self.pg0.assert_nothing_captured() out = self.pg1.get_capture() self.assertEqual(len(out), len(self.packets)) |