Strange search parameter

Technical discussion about the NMDC and <a href="http://dcpp.net/ADC.html">ADC</A> protocol. The NMDC protocol is documented in the <a href="http://dcpp.net/wiki/">Wiki</a>, so feel free to refer to it.

Moderator: Moderators

Locked
RabidWombat
Posts: 7
Joined: 2003-02-06 18:15

Strange search parameter

Post by RabidWombat » 2003-02-06 18:26

I run a PtokaX 0.3.2.2 Test2B hub on a LAN. From DC++ users (0.231 and previous versions) I've noticed funny $search commands.

10.69.10.71:2188 > $Search 127.0.0.1:26816 F?T?0?1?tac$ops

Why is the return IP the local host when it should obviously be 10.69.10.71??
"If a pretty poster and a cute saying are all it takes to motivate you, you probably have a VERY easy job. The kind robots will be doing soon."

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2003-02-06 19:22

some hubs doesn't care which IP you send, it will use the ip that it see's.

so this is nothing funny, try to connect out of the box ;))

this-is-a-common-thing-in-many-hubsoftwares...
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

RabidWombat
Posts: 7
Joined: 2003-02-06 18:15

Not a hub issue.

Post by RabidWombat » 2003-02-06 20:00

I wasn't suggesting it was a hub issue. DC++ sends the $Search command with the incorrect IP. I was wondering why DC++ would do this. I'm trying to narrow the bug down to specific inputs, but have had no luck.
"If a pretty poster and a cute saying are all it takes to motivate you, you probably have a VERY easy job. The kind robots will be doing soon."

ivulfusbar
Posts: 506
Joined: 2003-01-03 07:33

Post by ivulfusbar » 2003-02-07 02:37

so then posting what hub you used is useless information? right? thats why i thought you meant that was the search-replie you got back from the hub, and not the search-string you sent.


maybee-this-make-you-understand-why-i-thougt-what-i-thought-ly'ers ,))
Everyone is supposed to download from the hubs, - I don´t know why, but I never do anymore.

ender
Posts: 224
Joined: 2003-01-03 17:47

Post by ender » 2003-02-07 03:52

DC either sends the IP it detects from your computer, or the override IP you set in the active mode editbox.

TasMan
Posts: 196
Joined: 2003-01-03 08:31
Location: Canada
Contact:

Post by TasMan » 2003-02-07 05:36

If the hub is running on your computer, it will report the 127.0.0.1 ip. Whenever I run a test hub, I connect and my ip is always that. Are you connecting via localhost?

RabidWombat
Posts: 7
Joined: 2003-02-06 18:15

Too much info

Post by RabidWombat » 2003-02-07 10:58

Sorry ivulfusbar, didn't mean to confuse you. Just wanted to give as much info in case it was necessary. No the hub is not on my computer. That's why I don't understand why other computers would be sending the localhost address to the hub.
"If a pretty poster and a cute saying are all it takes to motivate you, you probably have a VERY easy job. The kind robots will be doing soon."

Atomic Jo
Posts: 62
Joined: 2003-01-04 03:50
Location: Québec, Canada
Contact:

Re: Too much info

Post by Atomic Jo » 2003-02-07 11:04

RabidWombat wrote: [...]
That's why I don't understand why other computers would be sending the localhost address to the hub.
Sometimes I see the localhost adress (in the search command) of other users in my hub. And often this is due to the fact they host a hub too. I asked them if they are on several hubs, and they answered me they hosted a hub too, connected by localhost adress to their hub, and after they connected to my hub. DC++ seems to take the first IP used for connection for the search.

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 17:15

Post by arnetheduck » 2003-02-07 11:24

yes, this is a small flaw in the ip handling code in dc++, it uses the local ip of the last hub it connected to...I'll fix it "one fine day"....

RabidWombat
Posts: 7
Joined: 2003-02-06 18:15

"I think it's more complicated than that...."

Post by RabidWombat » 2003-02-13 22:26

I love Half Baked.... anyway.
Actually this error is pretty scary. I've been examing LOTS of logs to try to understand. As far as I can tell is some DC++ clients (0.181 - 0.231) get confused (looking into this). These computers do not have any hub software or even firewalls (we're all on a LAN here). These computers send all there commands with the local host address, 127.0.0.1, and of course, nothing works right for them. Now this is scary.
Client A has the 127.0.0.1 issue. They change to passive mode thinking it will help them connect to Client B.
A > $RevConnectToMe A B
B > $ConnectToMe A 127.0.0.1
After these two messages, B thinks it has IP 127.0.0.1!!! So the problem spreads. B does eventually fix itself. I'm going to continue working on this because it could become a serious exploit.

-RabidWombat
"If a pretty poster and a cute saying are all it takes to motivate you, you probably have a VERY easy job. The kind robots will be doing soon."

RabidWombat
Posts: 7
Joined: 2003-02-06 18:15

PS

Post by RabidWombat » 2003-02-13 22:51

Theoretically, there could be one person that connected to a hub on their own computer and then connected to mine. Then they could set themselves to passive and spread it.
"If a pretty poster and a cute saying are all it takes to motivate you, you probably have a VERY easy job. The kind robots will be doing soon."

Locked