mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
fixes issue #186
This commit is contained in:
parent
180ca69d02
commit
99ecefbdba
|
@ -458,6 +458,11 @@ namespace llarp
|
|||
}
|
||||
if(k == "ifname")
|
||||
{
|
||||
if(v.length() >= sizeof(m_Tun.ifname))
|
||||
{
|
||||
llarp::LogError(Name() + " ifname '", v, "' is too long");
|
||||
return false;
|
||||
}
|
||||
strncpy(m_Tun.ifname, v.c_str(), sizeof(m_Tun.ifname) - 1);
|
||||
llarp::LogInfo(Name(), " set ifname to ", m_Tun.ifname);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,11 @@ namespace llarp
|
|||
}
|
||||
if(k == "ifname")
|
||||
{
|
||||
if(v.length() >= sizeof(tunif.ifname))
|
||||
{
|
||||
llarp::LogError(Name() + " ifname '", v, "' is too long");
|
||||
return false;
|
||||
}
|
||||
strncpy(tunif.ifname, v.c_str(), sizeof(tunif.ifname) - 1);
|
||||
llarp::LogInfo(Name() + " setting ifname to ", tunif.ifname);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue