-
Notifications
You must be signed in to change notification settings - Fork 1.2k
res_pjsip_config_wizard: Force reload on Named ACL change events #1644
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
base: master
Are you sure you want to change the base?
Conversation
|
i think cherry-pick should be in a separate comment . |
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.
Attention! This pull request may contain issues that could prevent it from being accepted. Please review the checklist below and take the recommended action. If you believe any of these are not applicable, just add a comment and let us know.
- The PR description does not match the commit message body. This can cause confusion for reviewers and future maintainers. GitHub doesn't automatically update the PR description when you update the commit message so if you've updated the commit with a force-push, please update the PR description to match the new commit message body.
- The PR description and/or commit message has a malformed
FixesorResolvestrailer. TheFixesandResolveskeywords MUST be preceeded by a blank line and followed immediately by a colon, a space, a hash sign(#), and the issue number. If you have multiple issues to reference, you can add additionalFixesandResolvestrailers on consecutive lines as long as the first one has the preceeding blank line. A malformed trailer will prevent the issue from being automatically closed when the PR merges and from being listed in the release change logs.
Regular expression:^(Fixes|Resolves): #[0-9]+$.
Example:Fixes: #9999.
Documentation:
|
Workflow PRCheck completed successfully |
|
cherry-pick-to: 20 |
|
can not be cherry picked to 20 ? |
Unfortunately, I don't know... version 20 - I don't know how good the Stasis is there... :) |
|
The specific pattern of subscribing for ACL change events has been in use since 2013. |
1e7350d to
f4969bf
Compare
|
21 is security fix only and does not receive bug fixes. You should also not add an additional comment, but edit your existing one. |
|
Workflow PRCheck completed successfully |
|
Does my last commit look okay? :) |
|
It has yet to be reviewed, when it is then you'll see updates/comments/etc. |
f4969bf to
7161035
Compare
|
Workflow PRCheck failed |
Currently, endpoints created via the PJSIP Config Wizard do not update their ACL rules if the underlying Named ACL (in acl.conf) changes. This occurs because the wizard relies on file timestamp and content caching of pjsip_wizard.conf, which remains unchanged during an external ACL update. As a result, endpoints retain stale ACL rules even after a reload. This patch updates res_pjsip_config_wizard to subscribe to the ast_named_acl_change_type Stasis event. A local generation counter is incremented whenever an ACL change event is received. During a reload, the wizard compares the current local generation against the generation stored in the wizard object. If a change is detected: 1. The file cache optimization (CONFIG_FLAG_FILEUNCHANGED) is bypassed. 2. Wizard objects utilizing 'acl' or 'contact_acl' are forced to update, ensuring they pick up the new IP rules. Signed-off-by: Michal Hajek michal.hajek@daktela.com Fixes: asterisk#1641
7161035 to
d66cff4
Compare
|
Workflow PRCheck failed |
Currently, endpoints created via the PJSIP Config Wizard do not update their ACL rules if the underlying Named ACL (in acl.conf) changes. This occurs because the wizard relies on file timestamp and content caching of pjsip_wizard.conf, which remains unchanged during an external ACL update. As a result, endpoints retain stale ACL rules even after a reload.
This patch updates res_pjsip_config_wizard to subscribe to the ast_named_acl_change_type Stasis event. A local generation counter is incremented whenever an ACL change event is received.
During a reload, the wizard compares the current local generation against the generation stored in the wizard object. If a change is detected:
Signed-off-by: Michal Hajek michal.hajek@daktela.com
Fixes: #1641