Hi ,
I want to generate the packet like shown below.
pkt= Ether()/IP(src=3.1.1.1,dst=3.1.1.2)/UDP(dst=4789)/VxLAN(vni=1111)/Ether()/IP(src="1.0.0.x",dst="2.0.0.x")
Here x is varible
when i used STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"), it is changing both Outer IP and Inner IP headers values.
I tried this method , created new class InnerIP and added in the scapy layers inet.
class InnerIP(IP):
name="InnerIP"
pkt= Ether()/IP(src=3.1.1.1,dst=3.1.1.2)/UDP(dst=4789)/VxLAN(vni=1111)/Ether()/InnerIP(src="1.0.0.x",dst="2.0.0.x")
STLVmWrFlowVar(fv_name="dst", pkt_offset="InnerIP.dst"),
it is working fine now as generated the traffic as expected ,
But is this reliable or any other method to generate only variable inner packets??
Hi , I want to generate the packet like shown below. pkt= Ether()/IP(src=3.1.1.1,dst=3.1.1.2)/UDP(dst=4789)/VxLAN(vni=1111)/Ether()/IP(src="1.0.0.x",dst="2.0.0.x") Here x is varible when i used STLVmWrFlowVar(fv_name="dst", pkt_offset="IP.dst"), it is changing both Outer IP and Inner IP headers values.
I tried this method , created new class InnerIP and added in the scapy layers inet. class InnerIP(IP): name="InnerIP" pkt= Ether()/IP(src=3.1.1.1,dst=3.1.1.2)/UDP(dst=4789)/VxLAN(vni=1111)/Ether()/InnerIP(src="1.0.0.x",dst="2.0.0.x") STLVmWrFlowVar(fv_name="dst", pkt_offset="InnerIP.dst"), it is working fine now as generated the traffic as expected , But is this reliable or any other method to generate only variable inner packets??