diff options
| -rw-r--r-- | src/idevice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idevice.c b/src/idevice.c index 1f8972f..a14fae1 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -446,8 +446,8 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t | |||
| 446 | else if (((char*)device->conn_data)[1] == 0x1E) { // AF_INET6 (bsd) | 446 | else if (((char*)device->conn_data)[1] == 0x1E) { // AF_INET6 (bsd) |
| 447 | #ifdef AF_INET6 | 447 | #ifdef AF_INET6 |
| 448 | saddr->sa_family = AF_INET6; | 448 | saddr->sa_family = AF_INET6; |
| 449 | /* copy just the address without the scope id as it might be from a different host */ | 449 | /* copy the address and the host dependent scope id */ |
| 450 | memcpy(&saddr->sa_data[0], (char*)device->conn_data + 2, 22); | 450 | memcpy(&saddr->sa_data[0], (char*)device->conn_data + 2, 26); |
| 451 | #else | 451 | #else |
| 452 | debug_info("ERROR: Got an IPv6 address but this system doesn't support IPv6"); | 452 | debug_info("ERROR: Got an IPv6 address but this system doesn't support IPv6"); |
| 453 | return IDEVICE_E_UNKNOWN_ERROR; | 453 | return IDEVICE_E_UNKNOWN_ERROR; |
