TUN: set flag IFF_NO_PI
This commit is contained in:
parent
0332766f0d
commit
a497dade2e
|
@ -29,7 +29,7 @@ TunDevice::TunDevice(const std::string& dev)
|
||||||
*
|
*
|
||||||
* IFF_NO_PI - Do not provide packet information
|
* IFF_NO_PI - Do not provide packet information
|
||||||
*/
|
*/
|
||||||
ifr.ifr_flags = IFF_TUN;
|
ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
|
||||||
if(!dev.empty()) {
|
if(!dev.empty()) {
|
||||||
if(dev.size() >= IFNAMSIZ - 2)
|
if(dev.size() >= IFNAMSIZ - 2)
|
||||||
throw TunDevice::InitializationError("Device name is too long.");
|
throw TunDevice::InitializationError("Device name is too long.");
|
||||||
|
|
Loading…
Reference in a new issue