This patch will allow you to add what ip to listen to. I included a new flag
(-i) for this option..
-i ip Listen for connection on ip. (default all ip's)
Logged In: YES
This additional patch is also required to make it all work...
Logged In: YES
but why you set the ipo i in Initial_ListenPort, if someone
wants to fork the ctorrent it crashes couse bind ip is already in
use. In this case you cannot use more than one instance of
if you dont use -i it should work as before.
I made this patch so I could have one instance on each IP.
And it works as it should. I have used it several times on 3
ip's on the same machine without any problems. I just tested
to set up two instances of ctorrent on the same IP with and
without the -i option and it works...
He also has a 'bug' in his code that I fixed. This was
required for the ipbind to work, but it worked due to the
default to bind on *. He was just not following how to
program socks properly.
The original code sets the INADDR_ANY (listen to all IP's)
in the beginning of that function. I then check if we have a
value for the ip and then sets the IP in the struct before
it binds. It should not break anything at all. If you skip
the -i it should not do anything.
If you look at the patch again, you'll see that I do not do
anything else than that ifstatement and set that IP if its
not 0. It should not break anything at all. And its the only
place I can set the IP before the bind.
If my code would break, the original code would probably
also break. Note that I do not do anything with the port at
any time. Its just the IP I store before I start the bind
and listen (in tracker.cpp).
Be warned that its a really simple check. If you add an
nonfunctional IP it will not bind, it will just spit out
errors and continue, but it will not operate.
10u for detailed explanation. I see , you right.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.