From owner-svn-src-user@FreeBSD.ORG Sat Feb 6 04:34:07 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2401065670; Sat, 6 Feb 2010 04:34:07 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EEBD8FC13; Sat, 6 Feb 2010 04:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o164Y7DW053046; Sat, 6 Feb 2010 04:34:07 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o164Y7hZ053044; Sat, 6 Feb 2010 04:34:07 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201002060434.o164Y7hZ053044@svn.freebsd.org> From: Kip Macy Date: Sat, 6 Feb 2010 04:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203540 - user/kmacy/head_flowtable_v6/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Feb 2010 04:34:07 -0000 Author: kmacy Date: Sat Feb 6 04:34:07 2010 New Revision: 203540 URL: http://svn.freebsd.org/changeset/base/203540 Log: - store ports in network byte order Modified: user/kmacy/head_flowtable_v6/sys/net/flowtable.c Modified: user/kmacy/head_flowtable_v6/sys/net/flowtable.c ============================================================================== --- user/kmacy/head_flowtable_v6/sys/net/flowtable.c Sat Feb 6 04:22:54 2010 (r203539) +++ user/kmacy/head_flowtable_v6/sys/net/flowtable.c Sat Feb 6 04:34:07 2010 (r203540) @@ -470,8 +470,8 @@ ipv4_mbuf_demarshal(struct mbuf *m, stru switch (proto) { case IPPROTO_TCP: th = (struct tcphdr *)((caddr_t)ip + iphlen); - sport = ntohs(th->th_sport); - dport = ntohs(th->th_dport); + sport = th->th_sport; + dport = th->th_dport; if ((*flags & FL_HASH_ALL) && (th->th_flags & (TH_RST|TH_FIN))) *flags |= FL_STALE; @@ -1501,8 +1501,8 @@ flow_show(struct flowtable *ft, struct f inet_ntoa_r(*(struct in_addr *) &hashkey[2], daddr); if (ft->ft_flags & FL_HASH_ALL) { inet_ntoa_r(*(struct in_addr *) &hashkey[1], saddr); - sport = ((uint16_t *)hashkey)[0]; - dport = ((uint16_t *)hashkey)[1]; + sport = ntohs(((uint16_t *)hashkey)[0]); + dport = ntohs(((uint16_t *)hashkey)[1]); db_printf("%s:%d->%s:%d\n", saddr, sport, daddr, dport); } else db_printf("%s:\n", daddr);