summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-10-24 12:11:30 +0200
committerDimitri Staessens <dimitri.staessens@ugent.be>2018-10-24 15:13:05 +0200
commit991470de0c7b59c69dd2de8110ba1ddef042a473 (patch)
tree16f68df2823de3ead983ccfdd6f55846f3b5e3a9 /src
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 <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src')
-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)