Increase log level for dropped packet in sip_transport #3480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To fix #3476.
Currently, in
sip_transport
, when we receive a malformed packet, we will output the following log:Even though the log message contains the word "error", it's actually not a fatal error since the we will just drop/ignore the packet anyway.
This causes problems if there are some entities who keep sending rogue packets since the log will keep being printed and since the level is the highest, it can't be disabled and may even trigger unwanted actions.
Just for comparisons, other components have correctly used the appropriate log level:
https://github.com/pjsip/pjproject/blob/master/pjsip/src/pjsip/sip_endpoint.c#L1083
https://github.com/pjsip/pjproject/blob/master/pjsip/src/pjsip/sip_dialog.c#L1800
So in this PR, we will increase the log level and change the message to better reflect the circumstances.
Special thanks to @cristalink for the discussion and proposed fix.