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

Don't set the oper flags on client #443

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Don't set the oper flags on client #443

merged 2 commits into from
Jan 29, 2025

Conversation

glguy
Copy link
Collaborator

@glguy glguy commented Jan 29, 2025

The oper_conf flags are a different set of flag
bits than the client flags. The oper flags are
hardcoded to have ENCRYPTED set which is the same
flag as PINGSENT on the client struct. This can
cause a client to timeout if the last thing it
does is oper up.

The oper_conf flags are a different set of flag
bits than the client flags. The oper flags are
hardcoded to have ENCRYPTED set which is the same
flag as PINGSENT on the client struct. This can
cause a client to timeout if the last thing it
does is oper up.
@ilbelkyr
Copy link
Member

It looks like this was a remnant of a mechanism to apply privileges directly from the operator blocks which was deprecated with the introduction of privsets and removed in 10847f6. The deoper code still makes sure to remove oper-only flags:

#define OPER_FLAGS 0 /* no oper privs in Client.flags/oper_conf.flags currently */

source_p->flags &= ~OPER_FLAGS;

We can probably remove those lines as well considering they've gone unused since 2008.

@glguy glguy merged commit 7289d45 into main Jan 29, 2025
9 checks passed
@glguy glguy deleted the glguy/oper_up_flags branch January 29, 2025 18:11
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.

2 participants