From 686c3ee48ac06f9ed9d861d297e98b7a237b0b74 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Tue, 21 Feb 2017 10:16:32 -0600 Subject: [PATCH] fix topports_server chisel and wrong IP family (#760) --- userspace/libsinsp/fdinfo.h | 2 +- userspace/sysdig/chisels/topports_server.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/userspace/libsinsp/fdinfo.h b/userspace/libsinsp/fdinfo.h index 7619cf143d..73406ddd8d 100644 --- a/userspace/libsinsp/fdinfo.h +++ b/userspace/libsinsp/fdinfo.h @@ -235,7 +235,7 @@ class SINSP_PUBLIC sinsp_fdinfo { return m_sockinfo.m_ipv4info.m_fields.m_dport; } - else if(m_type == SCAP_FD_IPV4_SOCK) + else if(m_type == SCAP_FD_IPV6_SOCK) { return m_sockinfo.m_ipv6info.m_fields.m_dport; } diff --git a/userspace/sysdig/chisels/topports_server.lua b/userspace/sysdig/chisels/topports_server.lua index cb59e2fa40..24060176e1 100644 --- a/userspace/sysdig/chisels/topports_server.lua +++ b/userspace/sysdig/chisels/topports_server.lua @@ -37,7 +37,7 @@ function on_init() if print_container then chisel.exec("table_generator", - "fd.sproto,container.name", + "fd.sport,container.name", "Srv Port,container.name", "evt.rawarg.res", "Bytes", @@ -46,7 +46,7 @@ function on_init() "bytes") else chisel.exec("table_generator", - "fd.sproto", + "fd.sport", "Srv Port", "evt.rawarg.res", "Bytes",