1
0
Fork 0
mirror of https://github.com/yarrick/iodine.git synced 2025-04-07 19:12:07 +00:00
This commit is contained in:
Julian Kranz 2011-12-31 23:11:53 +01:00 committed by Barak A. Pearlmutter
parent ff1570c4cb
commit a6e285928e
3 changed files with 6 additions and 4 deletions

View file

@ -363,7 +363,7 @@ close_tun(int tun_fd)
}
int
write_tun(int tun_fd, char *data, size_t len)
write_tun(int tun_fd, unsigned char *data, size_t len)
{
#if defined (FREEBSD) || defined (DARWIN) || defined(NETBSD) || defined(WINDOWS32)
data += 4;
@ -372,8 +372,8 @@ write_tun(int tun_fd, char *data, size_t len)
#ifdef LINUX
data[0] = 0x00;
data[1] = 0x00;
data[2] = 0x08;
data[3] = 0x00;
data[2] = 0x86;
data[3] = 0xdd;
#else /* OPENBSD */
data[0] = 0x00;
data[1] = 0x00;

View file

@ -19,7 +19,7 @@
int open_tun(const char *);
void close_tun(int);
int write_tun(int, char *, size_t);
int write_tun(int, unsigned char *, size_t);
ssize_t read_tun(int, char *, size_t);
int tun_setip(const char *, const char *, int);
int tun_setmtu(unsigned);

View file

@ -113,6 +113,8 @@ find_user_by_ip(uint32_t ip)
int ret;
int i;
return 0;
ret = -1;
for (i = 0; i < usercount; i++) {
if (users[i].active && !users[i].disabled &&