[sr-dev] [kamailio/kamailio] cannot pase IPv6 Via (Issue #2898)

sergey-safarov notifications at github.com
Sat Oct 23 22:30:48 CEST 2021


### Description

Kamailio cannot parse Via header with full IPv6 address.
And generate errors like
```
ERROR: <core> [core/parser/msg_parser.c:340]: parse_headers(): bad header field [Via: SIP/2.0/TCP [2a00:1370:8131:ffdf:4398:8903:f613:58b6];branch=z9hG4bK02cc.edc691e200000000000000]
```

#### SIP Traffic

OPTIONS messages cannot be parsed
```
OPTIONS sip:example.com:5080;transport=tcp SIP/2.0
Via: SIP/2.0/TCP [2a00:1370:8131:ffdf:4398:8903:f613:58b6];branch=z9hG4bK0241.2e5db116000000000000000000000000.0
To: <sip:example.com:5080;transport=tcp>
From: <sip:proxy at example.com>;tag=ecfe220eb77cee2ab0369a33b85d6b69-54b37dee
CSeq: 10 OPTIONS
Call-ID: 0d2146aa2a479f0d-2232 at 192.168.1.6
Max-Forwards: 70
Content-Length: 0
```

OPTIONS messages parsed successfully.
```
OPTIONS sip:example.com.com:5080;transport=tcp SIP/2.0
Via: SIP/2.0/TCP [2600:1f1c:6d5:aa00::6];branch=z9hG4bK67a6.b0578ab2000000000000000000000000.0
To: <sip:example.com:5080;transport=tcp>
From: <sip:proxy at example.com>;tag=c9c2897ae0601f24edc14b3f5f65b7e4-02fff025
CSeq: 10 OPTIONS
Call-ID: 3555c29958953393-581752 at 3.101.84.6
Max-Forwards: 70
Content-Length: 0
```

### Additional Information

compiled commit 1483ddb735c3fa3ea77b6e2d54ec67584e56e15b

* **Operating System**:

lsb_release -a
```
[safarov at safarov-dell config]$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 33 (Thirty Three)
Release:	33
Codename:	ThirtyThree
```

uname -a
```
[root at safarov-dell kamailio]# uname -a
Linux safarov-dell.home 5.14.9-100.fc33.x86_64 #1 SMP Thu Sep 30 12:45:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2898
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20211023/f490ba3b/attachment-0001.htm>


More information about the sr-dev mailing list