Browse Source

Dont log connection id missmatches anymore

master
Dirk Engling 13 years ago
parent
commit
506c7883f7
  1. 16
      ot_udp.c

16
ot_udp.c

@ -27,14 +27,6 @@ static void udp_make_connectionid( uint32_t * connid, const ot_ip6 remoteip ) {
memcpy( connid, g_static_connid, 8 );
}
static int udp_test_connectionid( const uint32_t * const connid, const ot_ip6 remoteip ) {
/* Touch unused variable */
(void)remoteip;
/* Test against our static secret */
return !memcmp( connid, g_static_connid, 8 );
}
/* UDP implementation according to http://xbtt.sourceforge.net/udp_tracker_protocol.html */
void handle_udp6( int64 serversocket, struct ot_workstruct *ws ) {
ot_peer peer;
@ -73,9 +65,6 @@ void handle_udp6( int64 serversocket, struct ot_workstruct *ws ) {
if( byte_count < 98 )
return;
if( !udp_test_connectionid( inpacket, remoteip ))
fprintf( stderr, "UDP connect Connection id missmatch.\n" );
/* We do only want to know, if it is zero */
left = inpacket[64/4] | inpacket[68/4];
@ -112,9 +101,6 @@ void handle_udp6( int64 serversocket, struct ot_workstruct *ws ) {
break;
case 2: /* This is a scrape action */
if( !udp_test_connectionid( inpacket, remoteip ))
fprintf( stderr, "UDP scrape Connection id missmatch.\n" );
outpacket[0] = htonl( 2 ); /* scrape action */
outpacket[1] = inpacket[12/4];
@ -131,4 +117,4 @@ void udp_init( ) {
}
const char *g_version_udp_c = "$Source: /home/cvsroot/opentracker/ot_udp.c,v $: $Revision: 1.22 $\n";
const char *g_version_udp_c = "$Source: /home/cvsroot/opentracker/ot_udp.c,v $: $Revision: 1.23 $\n";

Loading…
Cancel
Save