From: Rosen Date: Tue, 3 Aug 2021 18:26:23 +0000 (+0800) Subject: tcpstates: incorrect display of dport (#3560) X-Git-Tag: v0.22.0~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10dac5fcdecd1afee08a3918feb744abeff81432;p=platform%2Fupstream%2Fbcc.git tcpstates: incorrect display of dport (#3560) fix incorrect display of dport for kprobe attachment in tcpstates --- diff --git a/tools/tcpstates.py b/tools/tcpstates.py index 5c04f452..ec5bb7b3 100755 --- a/tools/tcpstates.py +++ b/tools/tcpstates.py @@ -182,6 +182,7 @@ int kprobe__tcp_set_state(struct pt_regs *ctx, struct sock *sk, int state) // dport is either used in a filter here, or later u16 dport = sk->__sk_common.skc_dport; + dport = ntohs(dport); FILTER_DPORT // calculate delta