-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exiting data over tunnels is only allowed after opt-in via settings #1325
Conversation
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
67bdeac
to
75fe51e
Compare
retest this please |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
retest this please |
Refer to this link for build results (access rights to CI server needed): |
75fe51e
to
d33a2e9
Compare
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
@@ -643,6 +657,10 @@ def check_create(self, messages): | |||
if self.crypto.key.pub().key_to_bin() != message.payload.node_public_key: | |||
yield DropMessage(message, "TunnelCommunity: public keys do not match") | |||
continue | |||
|
|||
if not self.settings.become_exitnode and message.payload.become_exit: | |||
yield DropMessage(message, "Exit-node functionality disabled") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reply with a message saying denied or something like that, then choose a different peer if you receive a denied response. Otherwise creating a tunnel might be ridicously difficult.
Moreover, how are you going to link two tunnels? Are introduction/rendezvous points exit points? Because they do exit_data.
@whirm same thing is happening here, look it asserts http://jenkins.tribler.org//job/GH_Tribler_pull-request-tester-isolated_devel/292/artifact/output//Screenshot-33.png but "passes" passes all the tests |
@NielsZeilemaker it's weird. I'm only hooking on the sys.excepthook to capture unhandled exceptions I don't see how that can happen (If the test raises an exception my wrapper does nothing else than raising the exception again. It's when the test passes that I check for unhandled exceptions: https://github.com/Tribler/tribler/blob/devel/Tribler/Test/test_as_server.py#L56 I can't think of a way this would fail. Any idea? |
Maybe because callconditional is setting do_assert to False? Hence, it doesn't assert, it only quits. |
@whirm I agree with @NielsZeilemaker, can be the |
Well, then why is that test not setting it to True? I thought you where saying this has something to do with the unhandled exception catcher stuff I made. |
Because we didn't want to assert on the wx thread, but maybe that's OK now. You've modified this code |
@NielsZeilemaker and how was this supposed to work? how where the tests marked as failed if you weren't asserting? To me it looks like they have been always broken. the last time the assert thing was modified was in 2013... |
You removed the assert list, we did the asserts after closing tribler |
Oh man, I don't know how I went over that one. So we just need to remove the assertion skip everywhere. I'll make a PR for that. |
I guess, simply remove the option. But have a look if everything still works. Maybe you need to rewrite it such that if do_assert is false it adds the assert to the list and still only asserts after tribler quit |
@whirm I think we still need the option. For example, in |
cfd1599
to
23b8d85
Compare
Refer to this link for build results (access rights to CI server needed): |
retest this please |
The crypto bug still occasionly occurs, let's wait for the test result... Hopefully it passes again but it's a wild guess :) When looking to the output in jenkins, receiving/decoding data on the circuits to the rp / ip sometimes fails. The error was the same as the error when the same peer is used more than once in a circuit, but with the current code I don't see a place where this is still possible. What's the best way of debugging this kind of crypto problems? |
Refer to this link for build results (access rights to CI server needed): |
23b8d85
to
9275a72
Compare
Refer to this link for build results (access rights to CI server needed): |
retest this please |
9275a72
to
a40070b
Compare
Refer to this link for build results (access rights to CI server needed): |
Merged build finished. Test FAILed. |
Refer to this link for build results (access rights to CI server needed): |
a40070b
to
9d911b5
Compare
9d911b5
to
b3439a4
Compare
Merged build finished. Test PASSed. |
Refer to this link for build results (access rights to CI server needed): |
retest this please |
Refer to this link for build results (access rights to CI server needed): |
I tried to figure out the crypto bug but really have no clue. It seems it always occurs in the rp /ip circuit (not the linking one) with length 2, while peeling off data from the first layer. sometimes the first cell sent for the circuit succeeds and the next cells all fail. And sometimes, like the last test, all tunnel tests run without issues. Anyone having a suggestion or idea what the cause could be? Problem started after moving the exit node choice to the create_circuit method. |
It's decrypting with the wrong key, that's why we get the error. I'll have
|
Thanks for the insight @NielsZeilemaker. Does that mean this PR can be pushed through? Plus newer ones are opened for connectability, move the 4-8 creation magic into community.py etc.. |
Jup, that would be my suggestion
|
Exiting data over tunnels is only allowed after opt-in via settings
@NielsZeilemaker Finally resolved the issue! You were wrong - It was related to my changes. :-) The problem was caused by the selection of the
Although it should theoretically be possible to use the same hop multiple times in a circuit, the crypto in its current state will crash. You might solve this bug, but it eventually helped us to identify the problem of reusing hops in the same circuit... As long as everybody knows that failures in the crypto can be caused by reuse of hops, this should be fine. What do you think? BTW I'm already preparing a pull request which resolves this issue (and which adds some debugging info) |
For now, avoiding the same member twice seems to be a solution. I'll have a look if I can fix this bug later on. |
See #1174