This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/12787] New: __tcp_skb_dport should return value in host order.


http://sourceware.org/bugzilla/show_bug.cgi?id=12787

           Summary: __tcp_skb_dport should return value in host order.
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap@sourceware.org
        ReportedBy: alfred@riverbed.com


__tcp_skb_dport is inconsistent with __tcp_skb_sport; dport should return value
in host order.  possible patch:

diff --git a/tapset/tcp.stp b/tapset/tcp.stp
index 37227e9..2b5cff4 100644
--- a/tapset/tcp.stp
+++ b/tapset/tcp.stp
@@ -153,7 +153,7 @@ function __tcp_skb_sport:long (tcphdr:long)

 /* returns TCP destination port for a given sk_buff structure */
 function __tcp_skb_dport:long (tcphdr:long){
-       return @cast(tcphdr, "tcphdr")->dest
+       return ntohs(@cast(tcphdr, "tcphdr")->dest)
 }

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]