aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-06-14 16:45:07 -0700
committerDmitry Shmidt <dimitrysh@google.com>2011-06-14 17:16:05 -0700
commit49b71a9ee5f83c49125fd6aff49701524be7a618 (patch)
treeabaf0f36a944134587b09a5fede0fd599a7bc743
parent0545fad98723550607287a86bfee3807c7d26e91 (diff)
downloadexternal_dhcpcd-49b71a9ee5f83c49125fd6aff49701524be7a618.zip
external_dhcpcd-49b71a9ee5f83c49125fd6aff49701524be7a618.tar.gz
external_dhcpcd-49b71a9ee5f83c49125fd6aff49701524be7a618.tar.bz2
Check dst addr for NULL incase of IFF_POINTOPOINT interface (b/4603819)
Change-Id: I5ca1775fc16a89b1ffe4c946929afe8b1333f66e Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-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;