res_pjsip_config_wizard: Force reload on Named ACL change events#1644
res_pjsip_config_wizard: Force reload on Named ACL change events#1644hajekmi wants to merge 1 commit intoasterisk:masterfrom
Conversation
|
i think cherry-pick should be in a separate comment . |
|
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 |
7161035 to
d66cff4
Compare
|
I think you can merge it. Thanks |
d66cff4 to
fa071ed
Compare
|
Workflow PRCheck failed |
|
This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed. |
Pull Request Checklist Complete
|
Workflow Check 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 [email protected] Fixes: asterisk#1641
fa071ed to
2498412
Compare
|
Workflow Check 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:
ensuring they pick up the new IP rules.
Signed-off-by: Michal Hajek [email protected]
Fixes: #1641