OpenSIPS / opensips

OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
https://opensips.org
Other
1.26k stars 577 forks source link

[BUG] natping_tcp makes fragmented packets wrong #3454

Open firestation opened 3 weeks ago

firestation commented 3 weeks ago

Hi, seems i found some bug in TCP/TLS cases.

In short: when natping_tcp and "natping_interval" enabled, opensips makes TCP packets fragmented even it's less 1500. But, also, as i understood it makes wrong fragmentation.

To reproduce this bug you just need Alice(udp) and Bob(tcp) on vanilla opensips server configuration. then add nathelper with "natping_tcp" and "natping_interval" options enabled. then most of call to from Alice to Bob will cause error on Bob side. if bob is pjsip : "Error processing 914 bytes packet from TCP x.x.x.x:5061 : PJSIP syntax error exception when parsing 'Request Line' header on line 1 col 1:" and does not respond any on sip level. if bob is baresip: it will return "400 Bad"

in both cases sngrep will show correctly TCP SIP messages sended to Bob.
Wireshark show 2 packets: first with 58 data and then SIP packet with info "Continuation Data".

I have tested it on 3.3 and 3.4 Opensips from official repo. OS is oracle 9 and oracle 8, also tested on Debian 12 - the same issue

firestation commented 3 weeks ago

It's not related on network level, because i have tested on local interface(127.x.x.x) also.

github-actions[bot] commented 6 days ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.