summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3308d13)
In preparation of chroot/setuid operations, split out call to
try_outgoing_connections() from setup_network_connections()
(which was the last call in setup_network_connections()).
This is because dropping privileges should be done in-between
setup_network_connections() and try_outgoing_connections().
This patch renames setup_network_connections() to setup_network()
and moves call to try_outgoing_connections() into main routine.
No functional changes.
extern void send_packet(const struct node_t *, vpn_packet_t *);
extern void receive_tcppacket(struct connection_t *, char *, int);
extern void broadcast_packet(const struct node_t *, vpn_packet_t *);
extern void send_packet(const struct node_t *, vpn_packet_t *);
extern void receive_tcppacket(struct connection_t *, char *, int);
extern void broadcast_packet(const struct node_t *, vpn_packet_t *);
-extern bool setup_network_connections(void);
+extern bool setup_network(void);
extern void setup_outgoing_connection(struct outgoing_t *);
extern void try_outgoing_connections(void);
extern void close_network_connections(void);
extern void setup_outgoing_connection(struct outgoing_t *);
extern void try_outgoing_connections(void);
extern void close_network_connections(void);
- setup all initial network connections
-bool setup_network_connections(void)
+bool setup_network(void)
if(!setup_myself())
return false;
if(!setup_myself())
return false;
- try_outgoing_connections();
-
/* Setup sockets and open device. */
/* Setup sockets and open device. */
- if(!setup_network_connections())
+ /* Initiate all outgoing connections. */
+
+ try_outgoing_connections();
+
/* Start main loop. It only exits when tinc is killed. */
status = main_loop();
/* Start main loop. It only exits when tinc is killed. */
status = main_loop();