&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;
}