projects
/
framework
/
connectivity
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: Add helpers for removing nameservers and search domains
[framework/connectivity/connman.git]
/
src
/
dhcpv6.c
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index
bf764c8
..
574b19e
100644
(file)
--- a/
src/dhcpv6.c
+++ b/
src/dhcpv6.c
@@
-291,7
+291,8
@@
static void info_req_cb(GDHCPClient *dhcp_client, gpointer user_data)
dhcp->nameservers = nameservers;
dhcp->nameservers = nameservers;
- for (i = 0; dhcp->nameservers[i] != NULL; i++)
+ for (i = 0; dhcp->nameservers != NULL &&
+ dhcp->nameservers[i] != NULL; i++)
__connman_service_nameserver_append(service,
dhcp->nameservers[i],
FALSE);
__connman_service_nameserver_append(service,
dhcp->nameservers[i],
FALSE);
@@
-318,7
+319,8
@@
static void info_req_cb(GDHCPClient *dhcp_client, gpointer user_data)
dhcp->timeservers = timeservers;
dhcp->timeservers = timeservers;
- for (i = 0; dhcp->timeservers[i] != NULL; i++)
+ for (i = 0; dhcp->timeservers != NULL &&
+ dhcp->timeservers[i] != NULL; i++)
__connman_service_timeserver_append(service,
dhcp->timeservers[i]);
} else
__connman_service_timeserver_append(service,
dhcp->timeservers[i]);
} else
@@
-469,7
+471,8
@@
static int set_addresses(GDHCPClient *dhcp_client,
dhcp->nameservers = nameservers;
dhcp->nameservers = nameservers;
- for (i = 0; dhcp->nameservers[i] != NULL; i++)
+ for (i = 0; dhcp->nameservers != NULL &&
+ dhcp->nameservers[i] != NULL; i++)
__connman_service_nameserver_append(service,
dhcp->nameservers[i],
FALSE);
__connman_service_nameserver_append(service,
dhcp->nameservers[i],
FALSE);
@@
-496,7
+499,8
@@
static int set_addresses(GDHCPClient *dhcp_client,
dhcp->timeservers = timeservers;
dhcp->timeservers = timeservers;
- for (i = 0; dhcp->timeservers[i] != NULL; i++)
+ for (i = 0; dhcp->timeservers != NULL &&
+ dhcp->timeservers[i] != NULL; i++)
__connman_service_timeserver_append(service,
dhcp->timeservers[i]);
} else
__connman_service_timeserver_append(service,
dhcp->timeservers[i]);
} else