Intercept now checks ZT_NC_NWID environment variable for 16-digit network ID and does not initialize if not present.

This commit is contained in:
Adam Ierymenko 2015-11-23 13:59:38 -08:00
commit ef4472e185
2 changed files with 37 additions and 17 deletions

View file

@ -190,7 +190,7 @@ NetconEthernetTap::NetconEthernetTap(
{
char sockPath[4096],lwipPath[4096];
rpc_counter = -1;
Utils::snprintf(sockPath,sizeof(sockPath),"%s%snetcon_service_%.16llx",homePath,ZT_PATH_SEPARATOR_S,(unsigned long long)nwid);
Utils::snprintf(sockPath,sizeof(sockPath),"/tmp/.ztnc_%.16llx",homePath,ZT_PATH_SEPARATOR_S,(unsigned long long)nwid);
_dev = sockPath; // in netcon mode, set device to be just the network ID
Utils::snprintf(lwipPath,sizeof(lwipPath),"%s%sliblwip.so",homePath,ZT_PATH_SEPARATOR_S);