Mercurial > hg > quicktun
comparison src/common.c @ 39:47a34fe75c57
Added option to run a script after opening the tun device
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Mon, 06 May 2013 23:01:37 +0200 |
parents | d9f5caa13898 |
children | 54d28a81ca99 |
comparison
equal
deleted
inserted
replaced
38:d9f5caa13898 | 39:47a34fe75c57 |
---|---|
183 ioctl(ttfd, TUNSIFMODE, &i); | 183 ioctl(ttfd, TUNSIFMODE, &i); |
184 i = session->use_pi ? 1 : 0; | 184 i = session->use_pi ? 1 : 0; |
185 ioctl(ttfd, TUNSIFHEAD, &i); | 185 ioctl(ttfd, TUNSIFHEAD, &i); |
186 } | 186 } |
187 #endif | 187 #endif |
188 if (envval = getconf("TUN_UP_SCRIPT")) system(envval); | |
188 session->fd_dev = ttfd; | 189 session->fd_dev = ttfd; |
189 return ttfd; | 190 return ttfd; |
190 } | 191 } |
191 | 192 |
192 void hex2bin(unsigned char* dest, unsigned char* src, int count) { | 193 void hex2bin(unsigned char* dest, unsigned char* src, int count) { |