0
0
mirror of https://github.com/darkk/redsocks.git synced 2025-08-26 19:55:30 +00:00

Fixed getdestaddr() warning.

This commit is contained in:
darkk 2007-06-03 13:22:45 +00:00 committed by Leonid Evdokimov
parent b644e67ecb
commit ab1a2112b6
2 changed files with 9 additions and 2 deletions

7
base.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef BASE_H_SUN_JUN__3_20_15_57_2007
#define BASE_H_SUN_JUN__3_20_15_57_2007
/* $Id$ */
int getdestaddr(int fd, const struct sockaddr_in *client, const struct sockaddr_in *bindaddr, struct sockaddr_in *destaddr);
/* vim:set tabstop=4 softtabstop=4 shiftwidth=4: */
/* vim:set foldmethod=marker foldlevel=32 foldmarker={,}: */
#endif /* BASE_H_SUN_JUN__3_20_15_57_2007 */

View File

@ -7,12 +7,12 @@
#include <fcntl.h> #include <fcntl.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include <linux/netfilter_ipv4.h>
#include <event.h> #include <event.h>
#include "list.h" #include "list.h"
#include "parser.h" #include "parser.h"
#include "log.h" #include "log.h"
#include "main.h" #include "main.h"
#include "base.h"
#include "redsocks.h" #include "redsocks.h"
@ -358,7 +358,7 @@ static void redsocks_accept_client(int fd, short what, void *_arg)
goto fail; goto fail;
} }
error = getdestaddr(client_fd, &destaddr); error = getdestaddr(client_fd, &clientaddr, &self->config.bindaddr, &destaddr);
if (error) { if (error) {
goto fail; goto fail;
} }