projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18886b7
)
Fail if address, netmask or gateway are not provided
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 7 Oct 2008 12:21:02 +0000
(14:21 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 7 Oct 2008 12:21:02 +0000
(14:21 +0200)
plugins/ipv4.c
patch
|
blob
|
history
diff --git
a/plugins/ipv4.c
b/plugins/ipv4.c
index
0a66a23
..
67d1ed1
100644
(file)
--- a/
plugins/ipv4.c
+++ b/
plugins/ipv4.c
@@
-192,6
+192,9
@@
static int ipv4_probe(struct connman_element *element)
DBG("netmask %s", netmask);
DBG("gateway %s", gateway);
+ if (address == NULL || netmask == NULL || gateway == NULL)
+ return -EINVAL;
+
memset(&ipv4, 0, sizeof(ipv4));
ipv4.address.s_addr = inet_addr(address);
ipv4.netmask.s_addr = inet_addr(netmask);