Skip to content

Commit

Permalink
Remove unused -b option
Browse files Browse the repository at this point in the history
n2n already resolves the supernode address dynamically
  • Loading branch information
emanuele-f committed Aug 19, 2019
1 parent 25d4420 commit 49f1f1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
10 changes: 1 addition & 9 deletions edge.c
Expand Up @@ -143,7 +143,7 @@ static void help() {
#ifdef __linux__
"[-D] "
#endif
"[-r] [-E] [-v] [-i <reg_interval>] [-t <mgmt port>] [-b] [-A] [-h]\n\n");
"[-r] [-E] [-v] [-i <reg_interval>] [-t <mgmt port>] [-A] [-h]\n\n");

#if defined(N2N_CAN_NAME_IFACE)
printf("-d <tun device> | tun device name\n");
Expand All @@ -155,8 +155,6 @@ static void help() {
printf("-s <netmask> | Edge interface netmask in dotted decimal notation (255.255.255.0).\n");
printf("-l <supernode host:port> | Supernode IP:port\n");
printf("-i <reg_interval> | Registration interval, for NAT hole punching (default 20 seconds)\n");
printf("-b | Periodically resolve supernode IP\n");
printf(" | (when supernodes are running on dynamic IPs)\n");
printf("-p <local port> | Fixed local UDP port.\n");
#ifndef WIN32
printf("-u <UID> | User ID (numeric) to use when privileges are dropped.\n");
Expand Down Expand Up @@ -314,12 +312,6 @@ static int setOption(int optkey, char *optargument, n2n_priv_config_t *ec, n2n_e
}
#endif

case 'b':
{
conf->re_resolve_supernode_ip = 1;
break;
}

case 'p':
{
conf->local_port = atoi(optargument);
Expand Down
1 change: 0 additions & 1 deletion n2n.h
Expand Up @@ -206,7 +206,6 @@ typedef struct n2n_edge_conf {
n2n_sn_name_t sn_ip_array[N2N_EDGE_NUM_SUPERNODES];
n2n_community_t community_name; /**< The community. 16 full octets. */
n2n_transform_t transop_id; /**< The transop to use. */
uint8_t re_resolve_supernode_ip;
uint8_t dyn_ip_mode; /**< Interface IP address is dynamically allocated, eg. DHCP. */
uint8_t allow_routing; /**< Accept packet no to interface address. */
uint8_t drop_multicast; /**< Multicast ethernet addresses. */
Expand Down

3 comments on commit 49f1f1b

@Logan007
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"n2n already resolves the supernode address dynamically"

Could you please give a hint where in the code this happens?

@emanuele-f
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Logan007
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I see. That indeed gets called regularly by the supernode re-registration.

Please sign in to comment.