public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/12787] New: __tcp_skb_dport should return value in host order.
@ 2011-05-19 17:11 alfred at riverbed dot com
  2011-06-07 19:39 ` [Bug tapsets/12787] " dsmith at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: alfred at riverbed dot com @ 2011-05-19 17:11 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tapsets/12787] __tcp_skb_dport should return value in host order.
  2011-05-19 17:11 [Bug tapsets/12787] New: __tcp_skb_dport should return value in host order alfred at riverbed dot com
@ 2011-06-07 19:39 ` dsmith at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: dsmith at redhat dot com @ 2011-06-07 19:39 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsmith at redhat dot com
         Resolution|                            |FIXED

--- Comment #1 from David Smith <dsmith at redhat dot com> 2011-06-07 19:38:11 UTC ---
Thanks for the patch!  I've checked it in (commit 9eb555e).

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-07 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 17:11 [Bug tapsets/12787] New: __tcp_skb_dport should return value in host order alfred at riverbed dot com
2011-06-07 19:39 ` [Bug tapsets/12787] " dsmith at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).