From: Felix Fietkau Date: Tue, 30 May 2023 18:11:13 +0000 (+0200) Subject: host: fix crash parsing gateway when no endpoint is specified X-Git-Url: http://git.openwrt.org/source?a=commitdiff_plain;h=51be0ed659d0c8e86ef28b0de3da6b38809fa170;p=project%2Funetd.git host: fix crash parsing gateway when no endpoint is specified Signed-off-by: Felix Fietkau --- diff --git a/host.c b/host.c index 7522e8b..e4e38d3 100644 --- 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, - &gateway_buf, gateway ? strlen(endpoint) + 1 : 0); + &gateway_buf, gateway ? strlen(gateway) + 1 : 0); host->node.key = strcpy(name_buf, name); peer = &host->peer; }