### Description

Found error in the haproxy protocol parser
Does not properly parsed
```
$rcv(rcvip)
$rcv(srcport)
$rcv(rcvport)
```

#### Reproduction

This can be tested suing config file
```
#!define IPV6_ADDR ::1

tcp_accept_haproxy=yes
received_route_mode=1

listen=tcp:[IPV6_ADDR]:45060

loadmodule "xlog.so"
loadmodule "pv.so"

event_route[core:msg-received] {
        xerr("Source IP: $rcv(srcip)\n");
        xerr("Received socket: $rcv(rcvip)\n");
        xerr("Source port: $rcv(srcport)\n");
        xerr("Received port: $rcv(rcvport)\n");
}

request_route {
        drop;
}
```
Then required send call via haproxy server

```sh
sipp -l 1 -m 1 -t t1 -sn uac [2600::5]
```

#### Log Messages

```
 4(1749405) ERROR: <script>: Source IP: 2600:xxx:6d5:aa02::c3
 4(1749405) ERROR: <script>: Received socket: 2600:xxx:6d5:aa02::c3
 4(1749405) ERROR: <script>: Source port: 50707
 4(1749405) ERROR: <script>: Received port: 50195
```
Here is `received socket` contains "source ip" and porst parsed in the reverse 
order.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3683
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3...@github.com>
_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to