Skip to content
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

unreal4 wants SID, not SERVER, for remote server introductions #791

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesopo
Copy link
Member

@jesopo jesopo commented Jun 20, 2021

draft because this has only been tested live on pissnet so I'd like to run it by people more responsible than me

the problem here is SERVER is for direct server introductions and those expect passwords, so Atheme will be disconnected when it tries to jupe with SERVER due to "Missing password"

else sid[i]++;
break;
}
} while (server_find(sid));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally we like to be explicit about the NULL check

Copy link

@tzvetkoff tzvetkoff Jun 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see a few potential problems here:

  1. This algorithm will try generating sids like A00 after 9ZZ, which is invalid.
  2. sid is static, meaning it will eventually exceed 9ZZ (even though nobody will run services that long and jupe that many servers.)

I also wonder why don't reuse the original server sid (if found) and only generate a new sid when one is proactively jupe'ing servers before they were even introduced?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this SID generation was directly stolen from the other protocol modules

Copy link
Contributor

@kaniini kaniini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is correct other than the style change (or at least it was back in the ustream days)

@jesopo
Copy link
Member Author

jesopo commented Jun 28, 2021

I think this is currently in a state that is technically correct and works but it will still fail on atypically complex networks (i.e. pissnet) and I'm not certain why. I think we ought to be doing this via SF_JUPE_PENDING a-la bahamut & inspircd but I've not been able to make that work; every time I defer an unreal4 jupe with this, atheme suddenly stops processing (or even debug logging) received SQUITs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants