--- atftp-0.7.dfsg.orig/tftpd_list.c
+++ atftp-0.7.dfsg/tftpd_list.c
@@ -173,8 +173,7 @@
while (1)
{
- if ((tmp->client.sin_port == client->client.sin_port) &&
- (tmp->client.sin_addr.s_addr == client->client.sin_addr.s_addr) &&
+ if (sockaddr_equal(&tmp->client, &client->client) &&
(tmp->done == 0))
{
/* unlock mutex and exit */
@@ -249,7 +248,7 @@
*/
int tftpd_clientlist_done(struct thread_data *thread,
struct client_info *client,
- struct sockaddr_in *sock)
+ struct sockaddr_storage *sock)
{
struct client_info *head = thread->client_info;
@@ -266,7 +265,7 @@
/* walk the list to find this client */
while (head)
{
- if (memcmp(sock, &head->client, sizeof(struct sockaddr_in)) == 0)
+ if (sockaddr_equal(sock, &head->client))
{
head->done = 1;
pthread_mutex_unlock(&thread->client_mutex);