Skip to content

Conversation

@rebroad
Copy link
Contributor

@rebroad rebroad commented Jun 26, 2015

…onnections.

This bug was introduced in #5442

@jonasschnelli
Copy link
Contributor

Rhm... i think this PR does not change anything.

Your PR would allow the program flow to enter the else if (strCommand == "getaddr") even if if (!pfrom->fInbound),... but it would return true anyways on line 4743(https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L4743). Or do i miss something?

@rebroad
Copy link
Contributor Author

rebroad commented Jun 26, 2015

Yes, it will exit before displaying the "unknown command" message now.
On Jun 26, 2015 11:13 PM, "Jonas Schnelli" [email protected] wrote:

Rhm... i think this PR does not change anything.

Your PR would allow the program flow to enter the else if (strCommand ==
"getaddr") even if if (!pfrom->fInbound),... but it would return true
anyways on line 4743(
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L4743). Or do
i miss something?


Reply to this email directly or view it on GitHub
#6344 (comment).

@jonasschnelli
Copy link
Contributor

Ah. Right. Wasn't aware of the else on L4736.

utACK.

@jgarzik
Copy link
Contributor

jgarzik commented Jun 27, 2015

If we are changing this code, please also log this exceptional event.

concept ACK

@laanwj laanwj added the P2P label Jul 2, 2015
@laanwj
Copy link
Member

laanwj commented Jul 2, 2015

Meh.

a) the message will only appear when debug=net is set
b) at least with the old code it shows that something weird is happening, which is the point of verbose net logging (even though the message could be better) - after this patch it's ignored without any logging

@sipa
Copy link
Member

sipa commented Jul 9, 2015

Don't care.

@laanwj
Copy link
Member

laanwj commented Jul 10, 2015

I don't think this is enough of an improvement to merge, so going to close this.

@laanwj laanwj closed this Jul 10, 2015
@rebroad
Copy link
Contributor Author

rebroad commented Mar 1, 2016

@laanwj I'd consider this a bugfix rather than an improvement, since "getaddr" clearly is NOT an unknown command.

@maflcko
Copy link
Member

maflcko commented Mar 1, 2016

@rebroad The previous comments say that you are removing a line (interesting to at least some users) from the debug.log. Why not keep logging this with a proper message (as @jgarzik suggests)?

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants