The upper 8bits of the port number were always written as 0.
This could have lead to duplicate session ID strings in some rare cases.
Found by Coverity.
buffer_append_c(buf, (timestamp >> i) & 0xff);
buffer_append_c(buf, client->remote_port & 0xff);
- buffer_append_c(buf, (client->remote_port >> 16) & 0xff);
+ buffer_append_c(buf, (client->remote_port >> 8) & 0xff);
#ifdef HAVE_IPV6
if (IPADDR_IS_V6(&client->ip))
buffer_append(buf, &client->ip.u.ip6, sizeof(client->ip.u.ip6));