|
@ -1646,17 +1646,19 @@ static void readFromIPSocket(n2n_edge_t * eee, int in_sock) { |
|
|
|
|
|
|
|
|
decode_PACKET(&pkt, &cmn, udp_buf, &rem, &idx); |
|
|
decode_PACKET(&pkt, &cmn, udp_buf, &rem, &idx); |
|
|
|
|
|
|
|
|
// !!!
|
|
|
if(is_valid_peer_sock(&pkt.sock)) |
|
|
/* if(eee->conf.header_encryption == HEADER_ENCRYPTION_ENABLED) {
|
|
|
orig_sender = &(pkt.sock); |
|
|
|
|
|
|
|
|
|
|
|
/* // sketch for time stamp verification -- to be implemented !!!
|
|
|
|
|
|
|
|
|
if ( !time_stamp_verify (stamp, &... !!!) ) { |
|
|
if(eee->conf.header_encryption == HEADER_ENCRYPTION_ENABLED) { |
|
|
|
|
|
// find edge and its specific last time stamp or supernode's one !!!
|
|
|
|
|
|
if ( !time_stamp_verify (stamp, &found_time_stamp !!!) ) { |
|
|
traceEvent(TRACE_DEBUG, "readFromIPSocket dropped packet due to time stamp error."); |
|
|
traceEvent(TRACE_DEBUG, "readFromIPSocket dropped packet due to time stamp error."); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
*/ |
|
|
*/ |
|
|
if(is_valid_peer_sock(&pkt.sock)) |
|
|
|
|
|
orig_sender = &(pkt.sock); |
|
|
|
|
|
|
|
|
|
|
|
if(!from_supernode) { |
|
|
if(!from_supernode) { |
|
|
/* This is a P2P packet from the peer. We purge a pending
|
|
|
/* This is a P2P packet from the peer. We purge a pending
|
|
|