Browse Source

Don't allow passthrough subclients to resume

master
Con Kolivas 9 years ago
parent
commit
3b9a846340
  1. 10
      src/stratifier.c

10
src/stratifier.c

@ -1370,6 +1370,12 @@ static stratum_instance_t *__stratum_add_instance(ckpool_t *ckp, const int64_t i
return client;
}
/* passthrough subclients have client_ids in the high bits */
static inline bool passthrough_subclient(const int64_t client_id)
{
return (client_id > 0xffffffffll);
}
static uint64_t disconnected_sessionid_exists(sdata_t *sdata, const char *sessionid,
int *session_id, const int64_t id)
{
@ -1378,6 +1384,10 @@ static uint64_t disconnected_sessionid_exists(sdata_t *sdata, const char *sessio
uint64_t ret = 0;
int slen;
/* Don't allow passthrough subclients to resume */
if (passthrough_subclient(id))
goto out;
if (!sessionid)
goto out;
slen = strlen(sessionid) / 2;

Loading…
Cancel
Save