From fd894705feacc95f1eae1af2d6554ce2b10bf5ad Mon Sep 17 00:00:00 2001 From: Liviu Chircu Date: Thu, 11 Jan 2024 14:44:46 +0200 Subject: [PATCH] tracer: Fix mixing between "src_ip" and "dst_ip" Completes a13e03420c Credits to James Seer for reporting this issue! --- modules/tracer/tracer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tracer/tracer.c b/modules/tracer/tracer.c index 1a62c2c3b71..c6e0e69832c 100644 --- a/modules/tracer/tracer.c +++ b/modules/tracer/tracer.c @@ -2148,10 +2148,10 @@ static int sip_trace(struct sip_msg *msg, trace_info_p info, int leg_flag) } set_sock_columns( db_vals[4], db_vals[5], db_vals[6], fromip_buff, - msg->rcv.bind_address->adv_sock_str.len?(struct ip_addr *)&msg->rcv.bind_address->adv_address:&msg->rcv.dst_ip, msg->rcv.bind_address->adv_sock_str.len?msg->rcv.bind_address->adv_port:msg->rcv.dst_port, msg->rcv.proto); + &msg->rcv.src_ip, msg->rcv.src_port, msg->rcv.proto); set_sock_columns( db_vals[7], db_vals[8], db_vals[9], toip_buff, - &msg->rcv.dst_ip, msg->rcv.dst_port, msg->rcv.proto); + msg->rcv.bind_address->adv_sock_str.len?(struct ip_addr *)&msg->rcv.bind_address->adv_address:&msg->rcv.dst_ip, msg->rcv.bind_address->adv_sock_str.len?msg->rcv.bind_address->adv_port:msg->rcv.dst_port, msg->rcv.proto); db_vals[10].val.time_val = time(NULL);