mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
parent
ed25ff8d01
commit
0c3fdc4df3
|
@ -1068,11 +1068,6 @@ static int process_udp(n2n_sn_t * sss,
|
||||||
n2n_sock_t *tmp_sock;
|
n2n_sock_t *tmp_sock;
|
||||||
n2n_mac_t *tmp_mac;
|
n2n_mac_t *tmp_mac;
|
||||||
|
|
||||||
if(from_supernode != comm->is_federation) {
|
|
||||||
traceEvent(TRACE_DEBUG, "process_udp dropped REGISTER_SUPER: from_supernode value doesn't correspond to the internal federation marking");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&ack, 0, sizeof(n2n_REGISTER_SUPER_ACK_t));
|
memset(&ack, 0, sizeof(n2n_REGISTER_SUPER_ACK_t));
|
||||||
|
|
||||||
/* Edge/supernode requesting registration with us. */
|
/* Edge/supernode requesting registration with us. */
|
||||||
|
@ -1154,6 +1149,11 @@ static int process_udp(n2n_sn_t * sss,
|
||||||
ack.sock.port = ntohs(sender_sock->sin_port);
|
ack.sock.port = ntohs(sender_sock->sin_port);
|
||||||
memcpy(ack.sock.addr.v4, &(sender_sock->sin_addr.s_addr), IPV4_SIZE);
|
memcpy(ack.sock.addr.v4, &(sender_sock->sin_addr.s_addr), IPV4_SIZE);
|
||||||
|
|
||||||
|
if(from_supernode != comm->is_federation) {
|
||||||
|
traceEvent(TRACE_DEBUG, "process_udp dropped REGISTER_SUPER: from_supernode value doesn't correspond to the internal federation marking");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Add sender's data to federation (or update it) */
|
/* Add sender's data to federation (or update it) */
|
||||||
if(comm->is_federation == IS_FEDERATION) {
|
if(comm->is_federation == IS_FEDERATION) {
|
||||||
p = add_sn_to_federation_by_mac_or_sock(sss,&(ack.sock),&(reg.edgeMac));
|
p = add_sn_to_federation_by_mac_or_sock(sss,&(ack.sock),&(reg.edgeMac));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user