aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-06-14 17:29:14 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-06-14 17:29:14 -0700
commitd870426cf67e614e4cb938f9e66e00eeb57febc4 (patch)
treeabaf0f36a944134587b09a5fede0fd599a7bc743
parent3586ee3039bf5b36a7a80210698eceb3ab4f9be5 (diff)
parent49b71a9ee5f83c49125fd6aff49701524be7a618 (diff)
downloadexternal_dhcpcd-d870426cf67e614e4cb938f9e66e00eeb57febc4.zip
external_dhcpcd-d870426cf67e614e4cb938f9e66e00eeb57febc4.tar.gz
external_dhcpcd-d870426cf67e614e4cb938f9e66e00eeb57febc4.tar.bz2
am 49b71a9e: Check dst addr for NULL incase of IFF_POINTOPOINT interface (b/4603819)
* commit '49b71a9ee5f83c49125fd6aff49701524be7a618': Check dst addr for NULL incase of IFF_POINTOPOINT interface (b/4603819)
-rw-r--r--net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net.c b/net.c
index e26b8d4..f3147d6 100644
--- a/net.c
+++ b/net.c
@@ -526,7 +526,8 @@ do_address(const char *ifname,
addr->s_addr = a->sin_addr.s_addr;
net->s_addr = n->sin_addr.s_addr;
if (dst) {
- if (ifa->ifa_flags & IFF_POINTOPOINT)
+ /* TODO: Fix getifaddrs() */
+ if ((ifa->ifa_flags & IFF_POINTOPOINT) && d)
dst->s_addr = d->sin_addr.s_addr;
else
dst->s_addr = INADDR_ANY;