From 33a8091ed73a68ce6dd1df9665f224536b599d03 Mon Sep 17 00:00:00 2001 From: Yuval Tal Date: Tue, 14 Jun 2011 09:52:39 +0300 Subject: [PATCH] byte order was wrong for ipv4 address on top of ipv6 --- shairport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shairport.c b/shairport.c index bbc126ee..0a0178ae 100644 --- a/shairport.c +++ b/shairport.c @@ -336,7 +336,7 @@ void handleClient(int pSock, char *pPassword, char *pHWADDR) } addr; memcpy(&addr.s, &s->sin6_addr, sizeof(struct sockaddr_in6)); - if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\xff\xff\x00\x00", 12) == 0) + if(memcmp(&addr.bin[0], "\x00\x00\x00\x00" "\x00\x00\x00\x00" "\x00\x00\xff\xff", 12) == 0) { // its ipv4... memcpy(ipbin, &addr.bin[12], 4);