diff --git a/tests/hwsim/test_p2p_messages.py b/tests/hwsim/test_p2p_messages.py index 10738c2cc..1fca571d5 100644 --- a/tests/hwsim/test_p2p_messages.py +++ b/tests/hwsim/test_p2p_messages.py @@ -48,6 +48,14 @@ P2P_ATTR_INTERFACE = 16 P2P_ATTR_OPERATING_CHANNEL = 17 P2P_ATTR_INVITATION_FLAGS = 18 P2P_ATTR_OOB_GO_NEG_CHANNEL = 19 +P2P_ATTR_SERVICE_HASH = 21 +P2P_ATTR_SESSION_INFORMATION_DATA = 22 +P2P_ATTR_CONNECTION_CAPABILITY = 23 +P2P_ATTR_ADVERTISEMENT_ID = 24 +P2P_ATTR_ADVERTISED_SERVICE = 25 +P2P_ATTR_SESSION_ID = 26 +P2P_ATTR_FEATURE_CAPABILITY = 27 +P2P_ATTR_PERSISTENT_GROUP = 28 P2P_ATTR_VENDOR_SPECIFIC = 221 P2P_SC_SUCCESS = 0 @@ -575,6 +583,67 @@ def test_p2p_msg_invitation_req(dev, apdev): msg['payload'] += ie_p2p(attrs) hapd.mgmt_tx(msg) + # Too short Service Hash attribute + dialog_token += 1 + msg = p2p_hdr(dst, src, type=P2P_INVITATION_REQ, dialog_token=dialog_token) + attrs = struct.pack("