diff --git a/auth/auth.c b/auth/auth.c index 307225e..54449e8 100644 --- a/auth/auth.c +++ b/auth/auth.c @@ -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; diff --git a/auth/auth.h b/auth/auth.h index 85d2c81..945a45b 100644 --- a/auth/auth.h +++ b/auth/auth.h @@ -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); diff --git a/transport/wired.c b/transport/wired.c index 5453ed4..84dd84d 100644 --- a/transport/wired.c +++ b/transport/wired.c @@ -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 */ { }, };