Browse Source

safer checking for REGISTER_SUPER_ACK and UNREGISTER_SUPER (#611)

pull/612/head
randomize00 4 years ago
committed by GitHub
parent
commit
5aac8813e6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/sn_utils.c

8
src/sn_utils.c

@ -1430,8 +1430,8 @@ static int process_udp (n2n_sn_t * sss,
return -1;
}
if((from_supernode == 0) != (comm->is_federation == IS_NO_FEDERATION)) {
traceEvent(TRACE_DEBUG, "process_udp dropped UNREGISTER_SUPER: from_supernode value doesn't correspond to the internal federation marking.");
if((from_supernode == 1) || (comm->is_federation == IS_FEDERATION)) {
traceEvent(TRACE_DEBUG, "process_udp dropped UNREGISTER_SUPER: should not come from a supernode or federation.");
return -1;
}
@ -1486,8 +1486,8 @@ static int process_udp (n2n_sn_t * sss,
return -1;
}
if((from_supernode == 0) != (comm->is_federation == IS_NO_FEDERATION)) {
traceEvent(TRACE_DEBUG, "process_udp dropped REGISTER_SUPER_ACK: from_supernode value doesn't correspond to the internal federation marking.");
if((from_supernode == 0) || (comm->is_federation == IS_NO_FEDERATION)) {
traceEvent(TRACE_DEBUG, "process_udp dropped REGISTER_SUPER_ACK: should not come from an edge or regular community.");
return -1;
}

Loading…
Cancel
Save