projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added new config variable "ProxyMode". If enabled, all outgoing packets
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
b3474c3
..
58f3e02
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-111,7
+111,7
@@
cp
return 0;
}
return 0;
}
-int xrecv(conn_list_t *cl,
real_packet_t
*packet)
+int xrecv(conn_list_t *cl,
void
*packet)
{
vpn_packet_t vp;
int lenin;
{
vpn_packet_t vp;
int lenin;
@@
-258,8
+258,14
@@
cp
*/
int send_packet(ip_t to, vpn_packet_t *packet)
{
*/
int send_packet(ip_t to, vpn_packet_t *packet)
{
+ config_t const *cfg;
conn_list_t *cl;
cp
conn_list_t *cl;
cp
+ if(!(cfg = get_config_val(proxymode))) /* In case we are in proxy mode, just send everything to our uplink. */
+ cl = conn_list;
+ else
+ cl = lookup_conn(to);
+
if((cl = lookup_conn(to)) == NULL)
{
if(debug_lvl > 2)
if((cl = lookup_conn(to)) == NULL)
{
if(debug_lvl > 2)