From b9948a1a47e7d9449428048d16b34d5f02cbc597 Mon Sep 17 00:00:00 2001 From: Logan oos Even Date: Sun, 20 Mar 2022 13:57:38 +0100 Subject: [PATCH] made supernode ignore its own registration attempts --- src/sn_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sn_utils.c b/src/sn_utils.c index 40d6746..7d55f4a 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -2101,6 +2101,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;