Fix sk_interface_addr().

This was broken in commit e804e6, ifa_addr is a pointer to sockaddr,
it shouldn't be referenced for the memcpy call.

Acked-by: Jiri Benc <jbenc@redhat.com>
master
Miroslav Lichvar 2014-05-12 18:35:16 +02:00 committed by Richard Cochran
parent 424bbde8fc
commit 32ef7c0793
1 changed files with 1 additions and 1 deletions

2
sk.c
View File

@ -198,7 +198,7 @@ int sk_interface_addr(const char *name, int family, struct address *addr)
default:
continue;
}
memcpy(&addr->sa, &i->ifa_addr, addr->len);
memcpy(&addr->sa, i->ifa_addr, addr->len);
result = 0;
break;
}