summaryrefslogtreecommitdiff
path: root/src/net.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-11-20 17:45:35 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-11-20 17:45:35 +0100
commit4147e772cc70514247a852b1a109e017fc1aed57 (patch)
treead3ea6e731a462a9cd2174ab8dcce6dc4168fb1c /src/net.c
parent3a15af29752cbb355f3a14a9c856bc2730264929 (diff)
net: check input parameter in net_check
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net.c b/src/net.c
index 2919dc3..60e6559 100644
--- a/src/net.c
+++ b/src/net.c
@@ -139,6 +139,9 @@ bool net_check(struct network *net)
#endif
bool change = false;
+ if (!net)
+ return false;
+
if (str_isset(net->cfg.ifname)) {
(void)net_if_getaddr(net->cfg.ifname, AF_INET, &net->laddr);