Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions auth/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,27 @@ int gip_auth_process_pkt(struct gip_auth *auth, void *data, u32 len)
if (!auth->client)
return -ENODEV;

if (len < sizeof(*hdr))
return -EINVAL;
if (len < sizeof(*hdr)) {
int err;

if (auth->auth_skipped)
return 0;

if (((u8 *)data)[0] != GIP_AUTH_CTX_HANDSHAKE)
return -EINVAL;

err = gip_auth_send_complete(auth->client);
if (err)
return err;
{
u8 zero_key[GIP_AUTH_SESSION_KEY_LEN] = {0};

gip_set_encryption_key(auth->client, zero_key,
sizeof(zero_key));
}
auth->auth_skipped = true;
return 0;
}

if (hdr->error)
return -EPROTO;
Expand Down
2 changes: 2 additions & 0 deletions auth/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ struct gip_auth {

u8 pms[GIP_AUTH_SECRET_LEN];
u8 master_secret[GIP_AUTH_SECRET_LEN];

bool auth_skipped;
};

int gip_auth_send_complete(struct gip_client *client);
Expand Down
1 change: 1 addition & 0 deletions transport/wired.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ static const struct usb_device_id xone_wired_id_table[] = {
{ XONE_WIRED_VENDOR(0x0079) }, /* EasySMX */
{ XONE_WIRED_VENDOR(0x1038) }, /* SteelSeries ApS */
{ XONE_WIRED_VENDOR(0x1b1c) }, /* Corsair */
{ XONE_WIRED_VENDOR(0x37d7) }, /* Flydigi */
{ },
};

Expand Down