summaryrefslogtreecommitdiff
path: root/regress/sys/netinet6/frag6/frag6_ext.py
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-01 00:05:22 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-03-01 00:05:22 +0000
commit7b2730cfd0bd8e7cd26fa91d751988ce44260d79 (patch)
tree4285b50cd602e58e5869d3a9be744fd0a33f17c3 /regress/sys/netinet6/frag6/frag6_ext.py
parentcaf6dc7d95bee7741685c9186e89f4473f9a95a9 (diff)
Use consistent address schema with local and remote machine. Fill
variables with example IPs from my daily test run.
Diffstat (limited to 'regress/sys/netinet6/frag6/frag6_ext.py')
-rw-r--r--regress/sys/netinet6/frag6/frag6_ext.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/regress/sys/netinet6/frag6/frag6_ext.py b/regress/sys/netinet6/frag6/frag6_ext.py
index e10b0e0cf4d..cb08a0eed60 100644
--- a/regress/sys/netinet6/frag6/frag6_ext.py
+++ b/regress/sys/netinet6/frag6/frag6_ext.py
@@ -12,23 +12,24 @@ from scapy.all import *
pid=os.getpid()
eid=pid & 0xffff
payload="ABCDEFGHIJKLMNOP"
-packet=IPv6(src=SRC_OUT6, dst=DST_IN6)/ICMPv6EchoRequest(id=eid, data=payload)
+packet=IPv6(src=LOCAL_ADDR6, dst=REMOTE_ADDR6)/ \
+ ICMPv6EchoRequest(id=eid, data=payload)
frag=[]
fid=pid & 0xffffffff
frag.append(IPv6ExtHdrFragment(nh=58, id=fid, m=1)/str(packet)[40:56])
frag.append(IPv6ExtHdrFragment(nh=58, id=fid, offset=2)/str(packet)[56:64])
eth=[]
for f in frag:
- pkt=IPv6(src=SRC_OUT6, dst=DST_IN6)/IPv6ExtHdrHopByHop()/f
- eth.append(Ether(src=SRC_MAC, dst=DST_MAC)/pkt)
+ pkt=IPv6(src=LOCAL_ADDR6, dst=REMOTE_ADDR6)/IPv6ExtHdrHopByHop()/f
+ eth.append(Ether(src=LOCAL_MAC, dst=REMOTE_MAC)/pkt)
if os.fork() == 0:
time.sleep(1)
- sendp(eth, iface=SRC_IF)
+ sendp(eth, iface=LOCAL_IF)
os._exit(0)
-ans=sniff(iface=SRC_IF, timeout=3, filter=
- "ip6 and src "+DST_IN6+" and dst "+SRC_OUT6+" and icmp6")
+ans=sniff(iface=LOCAL_IF, timeout=3, filter=
+ "ip6 and src "+REMOTE_ADDR6+" and dst "+LOCAL_ADDR6+" and icmp6")
for a in ans:
if a and a.type == ETH_P_IPV6 and \
ipv6nh[a.payload.nh] == 'ICMPv6' and \