projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings showed using -D_FORTIFY_SOURCE=2
[tinc]
/
src
/
net.c
diff --git
a/src/net.c
b/src/net.c
index
528e046
..
64bca94
100644
(file)
--- a/
src/net.c
+++ b/
src/net.c
@@
-297,7
+297,7
@@
static void check_network_activity(fd_set * readset, fd_set * writeset) {
if(FD_ISSET(c->socket, readset)) {
if(c->status.connecting) {
c->status.connecting = false;
if(FD_ISSET(c->socket, readset)) {
if(c->status.connecting) {
c->status.connecting = false;
- getsockopt(c->socket, SOL_SOCKET, SO_ERROR, &result, &len);
+ getsockopt(c->socket, SOL_SOCKET, SO_ERROR,
(void *)
&result, &len);
if(!result)
finish_connecting(c);
if(!result)
finish_connecting(c);
@@
-506,10
+506,15
@@
int main_loop(void) {
subnet = node->data;
if(subnet->expires == 1) {
send_del_subnet(broadcast, subnet);
subnet = node->data;
if(subnet->expires == 1) {
send_del_subnet(broadcast, subnet);
+ if(subnet->owner->status.reachable)
+ subnet_update(subnet->owner, subnet, false);
subnet_del(subnet->owner, subnet);
} else if(subnet->expires == -1) {
subnet_del(subnet->owner, subnet);
} else if(subnet->expires == -1) {
- send_add_subnet(broadcast, subnet);
subnet->expires = 0;
subnet->expires = 0;
+ } else {
+ send_add_subnet(broadcast, subnet);
+ if(subnet->owner->status.reachable)
+ subnet_update(subnet->owner, subnet, true);
}
}
}
}
}
}