|
@ -2610,6 +2610,7 @@ void process_udp (n2n_edge_t *eee, const struct sockaddr_in *sender_sock, const |
|
|
char * ip_str = NULL; |
|
|
char * ip_str = NULL; |
|
|
n2n_REGISTER_SUPER_ACK_t ra; |
|
|
n2n_REGISTER_SUPER_ACK_t ra; |
|
|
uint8_t tmpbuf[REG_SUPER_ACK_PAYLOAD_SPACE]; |
|
|
uint8_t tmpbuf[REG_SUPER_ACK_PAYLOAD_SPACE]; |
|
|
|
|
|
char ip_tmp[N2N_EDGE_SN_HOST_SIZE]; |
|
|
n2n_REGISTER_SUPER_ACK_payload_t *payload; |
|
|
n2n_REGISTER_SUPER_ACK_payload_t *payload; |
|
|
int i; |
|
|
int i; |
|
|
int skip_add; |
|
|
int skip_add; |
|
@ -2679,7 +2680,8 @@ void process_udp (n2n_edge_t *eee, const struct sockaddr_in *sender_sock, const |
|
|
inet_ntop(payload->sock.family, |
|
|
inet_ntop(payload->sock.family, |
|
|
(payload->sock.family == AF_INET) ? (void*)&(payload->sock.addr.v4) : (void*)&(payload->sock.addr.v6), |
|
|
(payload->sock.family == AF_INET) ? (void*)&(payload->sock.addr.v4) : (void*)&(payload->sock.addr.v6), |
|
|
sn->ip_addr, N2N_EDGE_SN_HOST_SIZE - 1); |
|
|
sn->ip_addr, N2N_EDGE_SN_HOST_SIZE - 1); |
|
|
sprintf (sn->ip_addr, "%s:%u", sn->ip_addr, (uint16_t)(payload->sock.port)); |
|
|
sprintf(ip_tmp, "%s:%u", (char*)sn->ip_addr, (uint16_t)(payload->sock.port)); |
|
|
|
|
|
memcpy(sn->ip_addr, ip_tmp, sizeof(ip_tmp)); |
|
|
} |
|
|
} |
|
|
sn_selection_criterion_default(&(sn->selection_criterion)); |
|
|
sn_selection_criterion_default(&(sn->selection_criterion)); |
|
|
sn->last_seen = 0; /* as opposed to payload handling in supernode */ |
|
|
sn->last_seen = 0; /* as opposed to payload handling in supernode */ |
|
|