Skip to content

Commit

Permalink
Added the ability to specify (-c) on the supernode the list of allowe…
Browse files Browse the repository at this point in the history
…d communities

kill -HUP on the supernode lists the registered edges
  • Loading branch information
lucaderi committed Sep 28, 2018
1 parent cb9e758 commit fd356cd
Show file tree
Hide file tree
Showing 6 changed files with 1,561 additions and 414 deletions.
5 changes: 5 additions & 0 deletions community.list
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# List of allowed communities
#
mynetwork
netleo
2 changes: 1 addition & 1 deletion edge_utils.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ static void readFromMgmtSocket(n2n_edge_t * eee, int * keep_running) {
(unsigned int)peer_list_size(eee->known_peers)); (unsigned int)peer_list_size(eee->known_peers));


msg_len += snprintf((char *)(udp_buf+msg_len), (N2N_PKT_BUF_SIZE-msg_len), msg_len += snprintf((char *)(udp_buf+msg_len), (N2N_PKT_BUF_SIZE-msg_len),
"last super:%lu(%ld sec ago) p2p:%lu(%lD sec ago)\n", "last super:%lu(%ld sec ago) p2p:%lu(%ld sec ago)\n",
eee->last_sup, (now-eee->last_sup), eee->last_p2p, eee->last_sup, (now-eee->last_sup), eee->last_p2p,
(now-eee->last_p2p)); (now-eee->last_p2p));


Expand Down
2 changes: 2 additions & 0 deletions n2n.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ typedef struct ether_hdr ether_hdr_t;


#include <stdarg.h> #include <stdarg.h>


#include "uthash.h"

#ifdef WIN32 #ifdef WIN32
#include "win32/wintap.h" #include "win32/wintap.h"
#endif /* #ifdef WIN32 */ #endif /* #ifdef WIN32 */
Expand Down
3 changes: 3 additions & 0 deletions packages/etc/n2n/supernode.conf
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
# #
# -l=7777 # -l=7777
# #
# Specify in supernodes.list the list of allowed communities
#
# -c=supernodes.list
Loading

0 comments on commit fd356cd

Please sign in to comment.