Add Ping6 offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases Change-Id: I11b7cef13562884235bd4e505adec1fff381e7ab
This commit is contained in:
parent
d492666256
commit
c992100a71
1 changed files with 17 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
from mobly import asserts
|
||||
from scapy.layers.inet import IP, ICMP, IPOption_Router_Alert
|
||||
from scapy.layers.inet6 import IPv6, ICMPv6EchoRequest, ICMPv6EchoReply
|
||||
from scapy.layers.l2 import Ether
|
||||
from scapy.contrib.igmpv3 import IGMPv3, IGMPv3mq, IGMPv3mr, IGMPv3gr
|
||||
from net_tests_utils.host.python import apf_test_base, apf_utils, adb_utils, assert_utils, packet_utils
|
||||
|
|
@ -101,6 +102,22 @@ class ApfV6Test(apf_test_base.ApfTestBase):
|
|||
echo_request, "DROPPED_IPV4_PING_REQUEST_REPLIED", expected_echo_reply
|
||||
)
|
||||
|
||||
@apf_utils.at_least_B()
|
||||
def test_ipv6_icmp_echo_request_offload(self):
|
||||
eth = Ether(src=self.server_mac_address, dst=self.client_mac_address)
|
||||
ip = IPv6(src=self.server_ipv6_addresses[0], dst=self.client_ipv6_addresses[0])
|
||||
icmp = ICMPv6EchoRequest(id=1, seq=123)
|
||||
echo_request = bytes(eth/ip/icmp/b"hello").hex()
|
||||
|
||||
eth = Ether(src=self.client_mac_address, dst=self.server_mac_address)
|
||||
ip = IPv6(src=self.client_ipv6_addresses[0], dst=self.server_ipv6_addresses[0])
|
||||
icmp = ICMPv6EchoReply(id=1, seq=123)
|
||||
expected_echo_reply = bytes(eth/ip/icmp/b"hello").hex()
|
||||
|
||||
self.send_packet_and_expect_reply_received(
|
||||
echo_request, "DROPPED_IPV6_ICMP6_ECHO_REQUEST_REPLIED", expected_echo_reply
|
||||
)
|
||||
|
||||
@apf_utils.at_least_B()
|
||||
def test_igmpv3_general_query_offload(self):
|
||||
ether = Ether(src=self.server_mac_address, dst='01:00:5e:00:00:01')
|
||||
|
|
|
|||
Loading…
Reference in a new issue