]> git.ipfire.org Git - thirdparty/opentracker.git/log
thirdparty/opentracker.git
4 years agoFix return code check inversion introduced in last commit
Dirk Engling [Mon, 23 Aug 2021 16:12:23 +0000 (18:12 +0200)] 
Fix return code check inversion introduced in last commit

4 years agoMark return code of write() as intentionally unused
Dirk Engling [Sun, 22 Aug 2021 12:45:19 +0000 (14:45 +0200)] 
Mark return code of write() as intentionally unused

4 years agofix implicit fallthrough spelling
Romain Porte [Tue, 3 Aug 2021 11:59:09 +0000 (13:59 +0200)] 
fix implicit fallthrough spelling

This commit fixes the syntax of the implicit fallthrough comments, in
order to be matched by GCC (and probably other compilers as well) with
the following regular expression:

[ \t.!]*([Ee]lse,? |[Ii]ntentional(ly)? )? fall(s | |-)?thr(ough|u)[
\t.!]*(-[^\n\r]*)?

See: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough=

4 years agoopentracker.c: check set*id return values
Romain Porte [Tue, 3 Aug 2021 11:53:13 +0000 (13:53 +0200)] 
opentracker.c: check set*id return values

This commit fix the following similar warnings:

    opentracker.c:562:7: warning: ignoring return value of ‘setegid’
    declared with attribute ‘warn_unused_result’ [-Wunused-result]
    […]

The man page of these functions ask users to explicitly check the return
value in case of any error happening.

4 years agoFix typo. Thanks to Romain Porte
Dirk Engling [Tue, 27 Jul 2021 21:15:48 +0000 (23:15 +0200)] 
Fix typo. Thanks to Romain Porte

4 years agoObey DESTDIR macro. Thanks to Romain Porte
Dirk Engling [Tue, 27 Jul 2021 21:14:47 +0000 (23:14 +0200)] 
Obey DESTDIR macro. Thanks to Romain Porte

4 years agoUsing strip from enviroment to allow different strippers
Dirk Engling [Sun, 6 Jun 2021 01:02:14 +0000 (03:02 +0200)] 
Using strip from enviroment to allow different strippers

4 years agoMake accesslists work again by testing the actual result of bsearch. Thanks to Hanno
Dirk Engling [Sat, 5 Jun 2021 09:25:55 +0000 (11:25 +0200)] 
Make accesslists work again by testing the actual result of bsearch. Thanks to Hanno

4 years agoFix two issues when splitting an iovec to large iobatches
Dirk Engling [Sat, 8 May 2021 22:07:32 +0000 (00:07 +0200)] 
Fix two issues when splitting an iovec to large iobatches

4 years agoHandle eagain case in trywrite
Dirk Engling [Sat, 8 May 2021 22:02:13 +0000 (00:02 +0200)] 
Handle eagain case in trywrite

4 years agoAdd newline to debug string
Dirk Engling [Sat, 8 May 2021 22:00:55 +0000 (00:00 +0200)] 
Add newline to debug string

4 years agoMerge branch 'split-iobatches' of erdgeist.org:opentracker into split-iobatches
Dirk Engling [Sun, 25 Apr 2021 16:24:05 +0000 (18:24 +0200)] 
Merge branch 'split-iobatches' of erdgeist.org:opentracker into split-iobatches

4 years agoRemove old mman header
Dirk Engling [Sun, 25 Apr 2021 16:23:57 +0000 (18:23 +0200)] 
Remove old mman header

4 years agoTurn mmaps into malloc
Dirk Engling [Sun, 25 Apr 2021 16:23:00 +0000 (18:23 +0200)] 
Turn mmaps into malloc

4 years agoRetry successful writes immediately
Dirk Engling [Sun, 25 Apr 2021 11:30:24 +0000 (13:30 +0200)] 
Retry successful writes immediately

4 years agoSplit huge iovecs over multiple io_batches
Dirk Engling [Sat, 24 Apr 2021 01:25:30 +0000 (03:25 +0200)] 
Split huge iovecs over multiple io_batches

4 years agogzip iovecs always end on the boundary and don't need to be fixed
Dirk Engling [Thu, 22 Apr 2021 01:03:55 +0000 (03:03 +0200)] 
gzip iovecs always end on the boundary and don't need to be fixed

4 years agoAdd a handler for the EAGAIN reason code to iob_send
Dirk Engling [Wed, 21 Apr 2021 18:14:58 +0000 (20:14 +0200)] 
Add a handler for the EAGAIN reason code to iob_send

4 years agoRework fullscrape worker, unifying non-gzip and gzip code was a bad idea
Dirk Engling [Wed, 21 Apr 2021 12:41:59 +0000 (14:41 +0200)] 
Rework fullscrape worker, unifying non-gzip and gzip code was a bad idea

4 years agoaccesslist checker should not operate on an empty list
Dirk Engling [Tue, 20 Apr 2021 20:34:23 +0000 (22:34 +0200)] 
accesslist checker should not operate on an empty list

4 years agosrandomdev is not available on linuxes by default
Dirk Engling [Tue, 20 Apr 2021 02:14:11 +0000 (04:14 +0200)] 
srandomdev is not available on linuxes by default

4 years agoUse arc4random whereever we need strong entropy
Dirk Engling [Tue, 20 Apr 2021 02:05:50 +0000 (04:05 +0200)] 
Use arc4random whereever we need strong entropy

4 years agoUse dev random by default
Dirk Engling [Tue, 20 Apr 2021 01:49:58 +0000 (03:49 +0200)] 
Use dev random by default

4 years agoTurn random() to nrand48 in inner loop where it is not cryptographically relevant...
Dirk Engling [Tue, 20 Apr 2021 01:48:50 +0000 (03:48 +0200)] 
Turn random() to nrand48 in inner loop where it is not cryptographically relevant to avoid futex storm. Thanks and credits to Bart Smienk

4 years agoWhite space
Dirk Engling [Tue, 20 Apr 2021 01:31:58 +0000 (03:31 +0200)] 
White space

4 years agounmap file if a memory allocation error occurs
Dirk Engling [Mon, 19 Apr 2021 20:36:24 +0000 (22:36 +0200)] 
unmap file if a memory allocation error occurs

4 years agoMake accesslist reload thread safe. The last commit actually would make a free possib...
Dirk Engling [Mon, 19 Apr 2021 20:33:23 +0000 (22:33 +0200)] 
Make accesslist reload thread safe. The last commit actually would make a free possible while another thread was bsearching that memory

4 years agoTry accessing the access lists without locks by making the replacement process as...
Dirk Engling [Mon, 19 Apr 2021 20:12:50 +0000 (22:12 +0200)] 
Try accessing the access lists without locks by making the replacement process as atomic as possible.

4 years agoDe-bottleneck mutex access code
Dirk Engling [Mon, 19 Apr 2021 01:25:18 +0000 (03:25 +0200)] 
De-bottleneck mutex access code

7 years agoRemove debug code for self pipes
Dirk Engling [Fri, 25 May 2018 22:28:10 +0000 (00:28 +0200)] 
Remove debug code for self pipes

7 years agoTell libowfat about EWOULDBLOCK conditions
Dirk Engling [Fri, 25 May 2018 22:25:59 +0000 (00:25 +0200)] 
Tell libowfat about EWOULDBLOCK conditions

8 years agoregister both ends of self pipe to libowfat in order to use them
Dirk Engling [Mon, 29 Jan 2018 17:32:22 +0000 (17:32 +0000)] 
register both ends of self pipe to libowfat in order to use them

8 years agobreak belongs inside the guard
Dirk Engling [Fri, 28 Apr 2017 13:43:14 +0000 (15:43 +0200)] 
break belongs inside the guard

8 years agoincorporate a more verbose ascii dump, provided by Tom <tom@foscore.com>
Dirk Engling [Fri, 28 Apr 2017 13:42:17 +0000 (15:42 +0200)] 
incorporate a more verbose ascii dump, provided by Tom <tom@foscore.com>

8 years agoGet rid of some warnings regarding header guards
Dirk Engling [Fri, 28 Apr 2017 13:41:24 +0000 (15:41 +0200)] 
Get rid of some warnings regarding header guards

9 years agoAvoid double free when iob_addbuf_free fails, thanks to Sami Farin
Dirk Engling [Sun, 2 Oct 2016 16:47:16 +0000 (18:47 +0200)] 
Avoid double free when iob_addbuf_free fails, thanks to Sami Farin

10 years agoForgot to include one error code. Thanks to Lars Seipel
Dirk Engling [Fri, 11 Dec 2015 16:57:53 +0000 (17:57 +0100)] 
Forgot to include one error code. Thanks to Lars Seipel

10 years agodont count scrapes as full scrapes, fall through fail
Dirk Engling [Thu, 26 Nov 2015 19:30:00 +0000 (20:30 +0100)] 
dont count scrapes as full scrapes, fall through fail

10 years agoAccept was counted twice
Dirk Engling [Wed, 25 Nov 2015 01:11:29 +0000 (02:11 +0100)] 
Accept was counted twice

10 years agoAdd missing enum value. Thanks to zhangdongmao
Dirk Engling [Sun, 30 Aug 2015 21:56:56 +0000 (23:56 +0200)] 
Add missing enum value. Thanks to zhangdongmao

10 years agoIncrease number of locks to accomodate for more cores on contemporary CPUs
Dirk Engling [Sun, 7 Jun 2015 23:44:57 +0000 (01:44 +0200)] 
Increase number of locks to accomodate for more cores on contemporary CPUs

10 years agoAvoid reacting to our own error packets, should the happen to end up on our interface...
Dirk Engling [Fri, 5 Jun 2015 11:34:19 +0000 (13:34 +0200)] 
Avoid reacting to our own error packets, should the happen to end up on our interface with a spoofed source IP. Thanks to zorun.

10 years agoFix typo in stat reporting, use udp and not tcp counter. Thanks to zebulon
Dirk Engling [Mon, 27 Apr 2015 20:04:45 +0000 (22:04 +0200)] 
Fix typo in stat reporting, use udp and not tcp counter. Thanks to zebulon

11 years agoProtect static data by mutex
erdgeist [Mon, 6 Oct 2014 23:34:00 +0000 (01:34 +0200)] 
Protect static data by mutex

11 years agoOnly kick off udp handlers, when everything is initialised
erdgeist [Mon, 6 Oct 2014 22:32:07 +0000 (00:32 +0200)] 
Only kick off udp handlers, when everything is initialised

11 years agoInitialise all values of aes key
erdgeist [Mon, 6 Oct 2014 22:01:30 +0000 (00:01 +0200)] 
Initialise all values of aes key

12 years agoFix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander...
erdgeist [Sun, 4 Aug 2013 10:05:35 +0000 (10:05 +0000)] 
Fix immediate overwrite in the X-forwarded-for passing case. Thanks to Alexander Luetjen.

12 years agoFix spelling error ;)
erdgeist [Fri, 7 Jun 2013 14:03:37 +0000 (14:03 +0000)] 
Fix spelling error ;)

13 years agoDont make srandomdev the default, it exists only in BSDs
erdgeist [Fri, 8 Jun 2012 19:21:46 +0000 (19:21 +0000)] 
Dont make srandomdev the default, it exists only in BSDs

13 years agoMake woodpecker spotting more usable by adjusting count every 2 minutes
erdgeist [Sun, 3 Jun 2012 04:06:32 +0000 (04:06 +0000)] 
Make woodpecker spotting more usable by adjusting count every 2 minutes

13 years agoCalculate the old hash for the ip address only, when the current one mismatches
erdgeist [Sun, 3 Jun 2012 00:17:07 +0000 (00:17 +0000)] 
Calculate the old hash for the ip address only, when the current one mismatches

13 years agoDont ruin the srandomdev initialisation in trackerlogic's init
erdgeist [Sun, 3 Jun 2012 00:15:59 +0000 (00:15 +0000)] 
Dont ruin the srandomdev initialisation in trackerlogic's init

13 years agoForgot variable declaration
erdgeist [Thu, 31 May 2012 22:58:36 +0000 (22:58 +0000)] 
Forgot variable declaration

13 years agoreduce zlib warnings to when there really is something failing
erdgeist [Tue, 29 May 2012 22:10:14 +0000 (22:10 +0000)] 
reduce zlib warnings to when there really is something failing

13 years agonew flag to enforce gzip even if client did not request it
denis [Tue, 29 May 2012 20:42:00 +0000 (20:42 +0000)] 
new flag to enforce gzip even if client did not request it

13 years agoAdd rijndael to version report
erdgeist [Tue, 29 May 2012 03:41:49 +0000 (03:41 +0000)] 
Add rijndael to version report

13 years agoRemove debug info
erdgeist [Mon, 28 May 2012 19:08:01 +0000 (19:08 +0000)] 
Remove debug info

13 years agoReport connection id missmatch count
erdgeist [Mon, 28 May 2012 19:05:02 +0000 (19:05 +0000)] 
Report connection id missmatch count

13 years agoudp now generates a cryptographically secure token for connecting clients. This is...
erdgeist [Mon, 28 May 2012 15:26:13 +0000 (15:26 +0000)] 
udp now generates a cryptographically secure token for connecting clients. This is later verified.

13 years agoInit prng before udp code needs it.
erdgeist [Mon, 28 May 2012 15:24:33 +0000 (15:24 +0000)] 
Init prng before udp code needs it.

13 years agoAdd connection id missmatch code
erdgeist [Mon, 28 May 2012 15:15:32 +0000 (15:15 +0000)] 
Add connection id missmatch code

13 years agoAdding rijndael code for udp connection id calculation
erdgeist [Mon, 28 May 2012 14:47:58 +0000 (14:47 +0000)] 
Adding rijndael code for udp connection id calculation

13 years agoDo not always grow the vector, shrink the first iovec to 0 before filling the second one
erdgeist [Fri, 18 May 2012 08:45:32 +0000 (08:45 +0000)] 
Do not always grow the vector, shrink the first iovec to 0 before filling the second one

13 years agoNeed more space for top100
erdgeist [Fri, 18 May 2012 08:34:35 +0000 (08:34 +0000)] 
Need more space for top100

13 years agoAdd a top100 for most popular torrents
erdgeist [Fri, 18 May 2012 05:16:57 +0000 (05:16 +0000)] 
Add a top100 for most popular torrents

13 years agoAdd functionality to distribute udp to several workers
erdgeist [Wed, 25 Apr 2012 05:48:16 +0000 (05:48 +0000)] 
Add functionality to distribute udp to several workers

14 years agoundo last change, it did not work well
erdgeist [Sun, 1 Apr 2012 04:11:27 +0000 (04:11 +0000)] 
undo last change, it did not work well

14 years agofix tiny issue
erdgeist [Sun, 1 Apr 2012 03:23:50 +0000 (03:23 +0000)] 
fix tiny issue

14 years agofix prototype
erdgeist [Sun, 1 Apr 2012 03:22:15 +0000 (03:22 +0000)] 
fix prototype

14 years agoTry to act upon all udp packets at once
erdgeist [Sat, 31 Mar 2012 20:01:05 +0000 (20:01 +0000)] 
Try to act upon all udp packets at once

14 years agosilenced some clang warnings
denis [Wed, 16 Nov 2011 00:41:16 +0000 (00:41 +0000)] 
silenced some clang warnings

15 years agoOpen syslog connection before dropping privileges
erdgeist [Sat, 11 Dec 2010 15:50:56 +0000 (15:50 +0000)] 
Open syslog connection before dropping privileges

15 years agoPrevent infinite loop if whitelist ends in several returns
erdgeist [Thu, 26 Aug 2010 01:36:32 +0000 (01:36 +0000)] 
Prevent infinite loop if whitelist ends in several returns

15 years agoChomp all trailing space characters, including new lines, when parsing the config...
erdgeist [Wed, 18 Aug 2010 00:43:12 +0000 (00:43 +0000)] 
Chomp all trailing space characters, including new lines, when parsing the config file

15 years agoLoad state only after initialising all structs. Thanks to Michael S. Combs for pointi...
erdgeist [Tue, 17 Aug 2010 01:06:22 +0000 (01:06 +0000)] 
Load state only after initialising all structs. Thanks to Michael S. Combs for pointing out the buf

15 years agoStop sending tracker id with every packet
erdgeist [Sun, 15 Aug 2010 16:38:43 +0000 (16:38 +0000)] 
Stop sending tracker id with every packet

15 years agoDon't only walk through outgoing connections to search for connected peers
erdgeist [Sun, 15 Aug 2010 14:54:40 +0000 (14:54 +0000)] 
Don't only walk through outgoing connections to search for connected peers

15 years agoAddress reconnecting issues
erdgeist [Sun, 15 Aug 2010 13:59:08 +0000 (13:59 +0000)] 
Address reconnecting issues

15 years agoFixed sync loss bug
erdgeist [Sun, 15 Aug 2010 01:59:09 +0000 (01:59 +0000)] 
Fixed sync loss bug

15 years agoLooking into pointer arithmetics issue
erdgeist [Sat, 14 Aug 2010 15:22:20 +0000 (15:22 +0000)] 
Looking into pointer arithmetics issue

15 years agotidy up peer count parser code
erdgeist [Sat, 14 Aug 2010 11:30:54 +0000 (11:30 +0000)] 
tidy up peer count parser code

15 years agoFix encoding of peer count in proxy sync packet
erdgeist [Sat, 14 Aug 2010 10:56:14 +0000 (10:56 +0000)] 
Fix encoding of peer count in proxy sync packet

15 years agoenable proxy.debug target
erdgeist [Sat, 14 Aug 2010 01:08:13 +0000 (01:08 +0000)] 
enable proxy.debug target

15 years agoTidy up sync proxy code
erdgeist [Fri, 13 Aug 2010 12:47:15 +0000 (12:47 +0000)] 
Tidy up sync proxy code

15 years agoReset http request input array on error case
erdgeist [Mon, 9 Aug 2010 14:22:12 +0000 (14:22 +0000)] 
Reset http request input array on error case

15 years agothe keep-alive loop must not run, if no keep alive is configured or requested for...
erdgeist [Mon, 9 Aug 2010 14:20:02 +0000 (14:20 +0000)] 
the keep-alive loop must not run, if no keep alive is configured or requested for connection

15 years agoWe have been too overly cautious not to read beyond the boundary.
erdgeist [Fri, 30 Jul 2010 15:02:57 +0000 (15:02 +0000)] 
We have been too overly cautious not to read beyond the boundary.

15 years agoMake whitelist parser more robust against comments. I assumed perfectly arranged...
erdgeist [Wed, 5 May 2010 12:56:13 +0000 (12:56 +0000)] 
Make whitelist parser more robust against comments. I assumed perfectly arranged white lists until now

15 years ago** struct ot_workstruct gets ritcher (and will become even ritcher soon).
erdgeist [Thu, 22 Apr 2010 22:08:42 +0000 (22:08 +0000)] 
** struct ot_workstruct gets ritcher (and will become even ritcher soon).
This is where we encapsulate all per-request data from peer to hash to peer_id, so that it is
available everywhere without passing hundreds of pointers down the stack. Most functions that
do work down the stack now accept an ot_workstruct and some flags. So it can end up in the
stats/event-handler where it will be the default parameter in the future.

** peer_id is now being copied by default and moved to ot_workstruct
So it is available in stats and subsequent functions.

** sync scrape madness is gone
SYNC_SCRAPE was intended to sync tracker state that would normally be lost on restarts i.e.
downloaded counts per torrent. The way was to push it in the tracker cloud after finding all
neighbouring trackers.
This is madness. It never was tested and can be done per tracker by fetching
stats/mode=statedump from time to time and starting opentracker with the -l option later.

** livesync thread has its own ot_workstruct now
So it can behave like ot_udp and ot_http against trackerlogic.c and get rid of the first half
of the embarrassing global variables. The sending half will be fixed soon [tm].

** stats can log completed events
The author recognizes the needs of original content distributors to keep track of the amount
of times a work has been downloaded. While not feasible and used on openbittorrent and other
open and anonymous tracker installations, a tracker user can now choose to send those events
to syslog.

15 years agoGet rid of SYNC_SCRAPE madness. It's overkill and no one uses it.
erdgeist [Thu, 22 Apr 2010 21:55:28 +0000 (21:55 +0000)] 
Get rid of SYNC_SCRAPE madness. It's overkill and no one uses it.

15 years agoFix white spaces
erdgeist [Wed, 21 Apr 2010 14:43:36 +0000 (14:43 +0000)] 
Fix white spaces

15 years agoAdd our own time stamps to the completed logs.
erdgeist [Wed, 21 Apr 2010 13:23:40 +0000 (13:23 +0000)] 
Add our own time stamps to the completed logs.

16 years agoMake opentracker's user runtime configurable. Also add more debug output to aid findi...
erdgeist [Fri, 9 Apr 2010 10:15:51 +0000 (10:15 +0000)] 
Make opentracker's user runtime configurable. Also add more debug output to aid finding problems.

16 years agoFix segfault in stats?mode=everything, an additional errorcode was not commited to...
erdgeist [Fri, 9 Apr 2010 09:40:12 +0000 (09:40 +0000)] 
Fix segfault in stats?mode=everything, an additional errorcode was not commited to ot_stats

16 years agoOnly chroot if -d option or tracker.rootdir are set
erdgeist [Fri, 9 Apr 2010 09:33:39 +0000 (09:33 +0000)] 
Only chroot if -d option or tracker.rootdir are set

16 years agoFixed including another error message
erdgeist [Tue, 1 Dec 2009 02:56:33 +0000 (02:56 +0000)] 
Fixed including another error message

16 years agoMake header parsing more efficient, prepare multithreading and keep-alive.
erdgeist [Wed, 18 Nov 2009 04:00:26 +0000 (04:00 +0000)] 
Make header parsing more efficient, prepare multithreading and keep-alive.

16 years agoPreparing more efficient header parsing
erdgeist [Wed, 18 Nov 2009 03:56:26 +0000 (03:56 +0000)] 
Preparing more efficient header parsing

16 years agoprevent infinite loop when looking for X-Forwarded-For: Headers
erdgeist [Mon, 16 Nov 2009 18:58:34 +0000 (18:58 +0000)] 
prevent infinite loop when looking for X-Forwarded-For: Headers

16 years agoAllow logging of completed events to syslog
erdgeist [Thu, 12 Nov 2009 10:18:27 +0000 (10:18 +0000)] 
Allow logging of completed events to syslog