Browse Source

Added the ability to specify (-c) on the supernode the list of allowed communities

kill -HUP on the supernode lists the registered edges
pull/53/head
Luca Deri 6 years ago
parent
commit
fd356cde64
  1. 5
      community.list
  2. 2
      edge_utils.c
  3. 2
      n2n.h
  4. 3
      packages/etc/n2n/supernode.conf
  5. 583
      sn.c
  6. 1074
      uthash.h

5
community.list

@ -0,0 +1,5 @@
#
# List of allowed communities
#
mynetwork
netleo

2
edge_utils.c

@ -921,7 +921,7 @@ static void readFromMgmtSocket(n2n_edge_t * eee, int * keep_running) {
(unsigned int)peer_list_size(eee->known_peers));
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,
(now-eee->last_p2p));

2
n2n.h

@ -111,6 +111,8 @@ typedef struct ether_hdr ether_hdr_t;
#include <stdarg.h>
#include "uthash.h"
#ifdef WIN32
#include "win32/wintap.h"
#endif /* #ifdef WIN32 */

3
packages/etc/n2n/supernode.conf

@ -9,3 +9,6 @@
#
# -l=7777
#
# Specify in supernodes.list the list of allowed communities
#
# -c=supernodes.list

583
sn.c

File diff suppressed because it is too large

1074
uthash.h

File diff suppressed because it is too large
Loading…
Cancel
Save