Skip to content

Commit 5f60a6b

Browse files
authored
made supernode ignore own registration attempts to allow unified configuration (command line-provided supernodes) of federated supernodes (#970)
1 parent 73d0d76 commit 5f60a6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sn_utils.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,6 +1938,11 @@ static int process_udp (n2n_sn_t * sss,
19381938
}
19391939
}
19401940

1941+
if(!memcmp(reg.edgeMac, sss->mac_addr, sizeof(n2n_mac_t))) {
1942+
traceEvent(TRACE_DEBUG, "Rx REGISTER_SUPER from self, ignoring");
1943+
return -1;
1944+
}
1945+
19411946
cmn2.ttl = N2N_DEFAULT_TTL;
19421947
cmn2.pc = n2n_register_super_ack;
19431948
cmn2.flags = N2N_FLAGS_SOCKET | N2N_FLAGS_FROM_SUPERNODE;

0 commit comments

Comments
 (0)