mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-26 03:35:30 +00:00
Fixed getdestaddr() warning.
This commit is contained in:
parent
b644e67ecb
commit
ab1a2112b6
7
base.h
Normal file
7
base.h
Normal 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 */
|
@ -7,12 +7,12 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <linux/netfilter_ipv4.h>
|
||||
#include <event.h>
|
||||
#include "list.h"
|
||||
#include "parser.h"
|
||||
#include "log.h"
|
||||
#include "main.h"
|
||||
#include "base.h"
|
||||
#include "redsocks.h"
|
||||
|
||||
|
||||
@ -358,7 +358,7 @@ static void redsocks_accept_client(int fd, short what, void *_arg)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
error = getdestaddr(client_fd, &destaddr);
|
||||
error = getdestaddr(client_fd, &clientaddr, &self->config.bindaddr, &destaddr);
|
||||
if (error) {
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user