kamailio
kamailio copied to clipboard
ims_registrar_pcscf,ims_qos: support for trusting bottom via
Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in
doc/subfolder, the README file is autogenerated)
Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
Checklist:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to draft-PR https://github.com/kamailio/kamailio/pull/3891
Description
Normally, the IMS P-CSCF should identify the clients (UEs) by the received IP address and ports on Rx. The current code is using a mix of that, plus using Contact and Via headers, with arguable potential security issues.
This patch adds a new parameter to ims_registrar_pcscf and ims_qos modules, allowing for an optional outsource of the IPsec functionality to another element, which is also in charge of checking/enforcing correct UE Via header. The existing code is allowed to work as before, with the default value of the flag being towards that.
List of functional changes:
ims_qos- added
trust_bottom_viaparameter - used it on
w_rx_aar_register()
- added
ims_registrar_pcscf- added
trust_bottom_viaparameter - used it on
update_contacts(),save_pending(),check_contact(),getContactP(),check_service_routes(),enforce_service_routes() - made
ims_ipsec_pcscfdependency optional, with checks when used - skipped checks of
port-ucincheckcontact()if theims_ipsec_pcscfmodule was not loaded - added
ignore_contact_rxproto_checkparameter - IMS devices open IPsec Security Associations just between IPs and ports, with both UDP and TCP protocols allowed. The default then was set here to always ignore protocol checks. Before, theignore_contact_rxport_checkwas used to skip this and still make it work, but that seemed like a typo/mistake with hidden effects.
- added
List of indirect changes:
core/ut.h: added astr2ushort()macro, since code was using some dangerous casting and macros with a larger typeims_registrar_pcscf: addedRouteheaders inSUBSCRIBEtoreginfo, with values fromService-Routes, as per 3GPP specs.ims_usrloc_pcscf: small log fixes
For even more context, please see the discussion in https://github.com/kamailio/kamailio/pull/3891