projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed typos. When terminating a connection, it's status is not only set to
[tinc]
/
src
/
netutl.c
diff --git
a/src/netutl.c
b/src/netutl.c
index
cc8266d
..
4d6364e
100644
(file)
--- a/
src/netutl.c
+++ b/
src/netutl.c
@@
-37,7
+37,8
@@
/*
look for a connection associated with the given vpn ip,
/*
look for a connection associated with the given vpn ip,
- return its connection structure
+ return its connection structure.
+ Skips connections that are not activated!
*/
conn_list_t *lookup_conn(ip_t ip)
{
*/
conn_list_t *lookup_conn(ip_t ip)
{
@@
-45,10
+46,10
@@
conn_list_t *lookup_conn(ip_t ip)
cp
/* Exact match suggested by James B. MacLean */
for(p = conn_list; p != NULL; p = p->next)
cp
/* Exact match suggested by James B. MacLean */
for(p = conn_list; p != NULL; p = p->next)
- if(
ip == p->vpn_ip
)
+ if(
(ip == p->vpn_ip) && p->status.active
)
return p;
for(p = conn_list; p != NULL; p = p->next)
return p;
for(p = conn_list; p != NULL; p = p->next)
- if((
ip & p->vpn_mask) == (p->vpn_ip & p->vpn_mask)
)
+ if((
(ip & p->vpn_mask) == (p->vpn_ip & p->vpn_mask)) && p->status.active
)
return p;
cp
return NULL;
return p;
cp
return NULL;