diff options
author | Matej Klotton <mklotton@cisco.com> | 2016-07-25 17:52:22 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-08-15 14:36:47 +0200 |
commit | 517ee7fd3eb28ecf030c5d50be09fcdabe508922 (patch) | |
tree | c6ac1ce632b96157b962f43c74f9c11cefca2ebe /resources/traffic_scripts | |
parent | bc4e345605abe0772043892fcc99fce9aa768edb (diff) |
CSIT-197: Add basic mapping rule tests for MAP-E
- IPv4 prefix length + ea bits length < 32
- IPv4 prefix length + ea bits length == 32
- IPv4 prefix length + ea bits length > 32
- End user IPv6 prefix is 64
- IPv4 preffix is 0
Change-Id: Ib8d76abfebfb206fbbaa3c1422b2d321a3ed8712
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'resources/traffic_scripts')
-rwxr-xr-x | resources/traffic_scripts/send_ipv4_udp_check_lw_4o6.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/traffic_scripts/send_ipv4_udp_check_lw_4o6.py b/resources/traffic_scripts/send_ipv4_udp_check_lw_4o6.py index 881abc83a2..116edb206b 100755 --- a/resources/traffic_scripts/send_ipv4_udp_check_lw_4o6.py +++ b/resources/traffic_scripts/send_ipv4_udp_check_lw_4o6.py @@ -19,6 +19,7 @@ import sys from scapy.layers.l2 import Ether from scapy.layers.inet import IP, UDP +from ipaddress import ip_address from resources.libraries.python.PacketVerifier import RxQueue, TxQueue from resources.libraries.python.TrafficScriptArg import TrafficScriptArg @@ -88,12 +89,12 @@ def main(): # pylint: disable=too-many-statements, too-many-locals ipv6 = ether.payload # check ipv6 - if ipv6.dst != rx_dst_ipv6: + if ip_address(unicode(ipv6.dst)) != ip_address(unicode(rx_dst_ipv6)): raise RuntimeError("Destination IP error {} != {}.". format(ipv6.dst, rx_dst_ipv6)) print "Destination IPv6: OK." - if ipv6.src != rx_src_ipv6: + if ip_address(unicode(ipv6.src)) != ip_address(unicode(rx_src_ipv6)): raise RuntimeError("Source IP error {} != {}.". format(ipv6.src, rx_src_ipv6)) print "Source IPv6: OK." |