diff options
-rw-r--r-- | opentracker.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c index ecc2c9c..36fa989 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -614,6 +614,10 @@ static void handle_udp4( int64 serversocket ) { | |||
614 | if( r < 16 ) | 614 | if( r < 16 ) |
615 | return; | 615 | return; |
616 | 616 | ||
617 | /* look for udp bittorrent magic id */ | ||
618 | if( (ntohl(inpacket[0]) != 0x00000417) || (ntohl(inpacket[1]) != 0x27101980) ) | ||
619 | return; | ||
620 | |||
617 | switch( ntohl( inpacket[2] ) ) { | 621 | switch( ntohl( inpacket[2] ) ) { |
618 | case 0: /* This is a connect action */ | 622 | case 0: /* This is a connect action */ |
619 | outpacket[0] = 0; outpacket[1] = inpacket[3]; | 623 | outpacket[0] = 0; outpacket[1] = inpacket[3]; |