voipmonitor / sniffer

VoIPmonitor sniffer sources
226 stars 105 forks source link

Kamailo mirroring related fix #100

Closed Den4t closed 2 years ago

Den4t commented 2 years ago

Hi !

This patch are related to kamailio mirroring.

What this patch do - suppose we work in mixed IPv6/IPv4 enviroment, we configure kamailio siptrace diplication to IPv6 address and configure voipmonitor to listen at kamailio_dstip=[IPv6_address], when signaling duplicated from IPv6 segment we have the first problem - wrong parsing of kamailio extra headers which contains IPv6 in URI. The second problem appears when duplication packet from different address family, for example, kamailio_dstip=[IPv6_address] (voipmonitor capturing V6 packet) and URI in kamailio extra headers are IPv4 addresses, in this case current implementation make wrong encapsulation of pcap packet - eth headr contains IPv6 protocol type, but real payload is IPv4, can be in reverse also, if voipmonitor listen at IPv4, but frame mirrored from IPv6.

voipmonitor commented 2 years ago

thank you, merged to develop branch.