summaryrefslogtreecommitdiff
path: root/src/tools/ovpn
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2018-10-24 12:11:30 +0200
committerDimitri Staessens <[email protected]>2018-10-24 15:13:05 +0200
commit991470de0c7b59c69dd2de8110ba1ddef042a473 (patch)
tree16f68df2823de3ead983ccfdd6f55846f3b5e3a9 /src/tools/ovpn
parentda60c56365ac13a262ffa6adaba7540c4d914843 (diff)
downloadouroboros-991470de0c7b59c69dd2de8110ba1ddef042a473.tar.gz
ouroboros-991470de0c7b59c69dd2de8110ba1ddef042a473.zip
tools: Add IFF_NO_PI flag to ovpn
The flag IFF_NO_PI is needed to make sure that no extra protocol header is added to the payload that is received on the TUN interface. Signed-off-by: Sander Vrijders <[email protected]> Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'src/tools/ovpn')
-rw-r--r--src/tools/ovpn/ovpn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/ovpn/ovpn.c b/src/tools/ovpn/ovpn.c
index d5e9d024..8de794fa 100644
--- a/src/tools/ovpn/ovpn.c
+++ b/src/tools/ovpn/ovpn.c
@@ -89,7 +89,7 @@ static int tun_open(char * dev,
memset(&ifr, 0, sizeof(ifr));
- ifr.ifr_flags = IFF_TUN;
+ ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (ret < 0)