projects
/
project
/
unetd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
host: fix crash parsing gateway when no endpoint is specified
[project/unetd.git]
/
host.c
diff --git
a/host.c
b/host.c
index 7522e8b1fba8ee0140ff9d7ebb0914b98017114c..e4e38d33079978b6f4f5c402c601aa1e1d9c15eb 100644
(file)
--- a/
host.c
+++ b/
host.c
@@
-179,7
+179,7
@@
network_host_create(struct network *net, struct blob_attr *attr, bool dynamic)
&ipaddr, ipaddr_len,
&subnet, subnet_len,
&endpoint_buf, endpoint ? strlen(endpoint) + 1 : 0,
&ipaddr, ipaddr_len,
&subnet, subnet_len,
&endpoint_buf, endpoint ? strlen(endpoint) + 1 : 0,
- &gateway_buf, gateway ? strlen(
endpoint
) + 1 : 0);
+ &gateway_buf, gateway ? strlen(
gateway
) + 1 : 0);
host->node.key = strcpy(name_buf, name);
peer = &host->peer;
}
host->node.key = strcpy(name_buf, name);
peer = &host->peer;
}