From 5f60a6b3334d556aabc60f017f99f3e305862e9d Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Sun, 20 Mar 2022 12:48:40 +0100 Subject: [PATCH] made supernode ignore own registration attempts to allow unified configuration (command line-provided supernodes) of federated supernodes (#970) --- src/sn_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sn_utils.c b/src/sn_utils.c index 4323ba4..f325c26 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -1938,6 +1938,11 @@ static int process_udp (n2n_sn_t * sss, } } + if(!memcmp(reg.edgeMac, sss->mac_addr, sizeof(n2n_mac_t))) { + traceEvent(TRACE_DEBUG, "Rx REGISTER_SUPER from self, ignoring"); + return -1; + } + cmn2.ttl = N2N_DEFAULT_TTL; cmn2.pc = n2n_register_super_ack; cmn2.flags = N2N_FLAGS_SOCKET | N2N_FLAGS_FROM_SUPERNODE;