From owner-svn-src-all@FreeBSD.ORG Thu Mar 5 07:42:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 282D1106564A; Thu, 5 Mar 2009 07:42:48 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8A48FC0A; Thu, 5 Mar 2009 07:42:47 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n257gld7066378; Thu, 5 Mar 2009 07:42:47 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n257gljY066376; Thu, 5 Mar 2009 07:42:47 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200903050742.n257gljY066376@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 5 Mar 2009 07:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189393 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 07:42:48 -0000 Author: luigi Date: Thu Mar 5 07:42:47 2009 New Revision: 189393 URL: http://svn.freebsd.org/changeset/base/189393 Log: Merge a couple of changes from HEAD, plus fix a potential warning. In detail: + we used SYSCTL_LONG to show a 64-bit variable. For the time being just remove the variable from the list of sysctl-exported values. Unfortunately our SYSCTL macros do not do proper type checking of the arguments so we might have some more bugs of this kind across the codebase; + fw_debug has not been used for ages, so remove it; + gcc 4.2.4 tells me that src_ip.s_addr may be not initialized, so make sure it is. I need to check what is the status of this field in head. Modified: stable/7/sys/netinet/ip_dummynet.c stable/7/sys/netinet/ip_fw2.c Modified: stable/7/sys/netinet/ip_dummynet.c ============================================================================== --- stable/7/sys/netinet/ip_dummynet.c Thu Mar 5 06:26:08 2009 (r189392) +++ stable/7/sys/netinet/ip_dummynet.c Thu Mar 5 07:42:47 2009 (r189393) @@ -160,8 +160,10 @@ SYSCTL_DECL(_net_inet_ip); SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet, CTLFLAG_RW, 0, "Dummynet"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, CTLFLAG_RW, &dn_hash_size, 0, "Default hash table size"); +#if 0 /* curr_time is 64 bit */ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, curr_time, CTLFLAG_RD, &curr_time, 0, "Current tick"); +#endif SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, ready_heap, CTLFLAG_RD, &ready_heap.size, 0, "Size of ready heap"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, extract_heap, Modified: stable/7/sys/netinet/ip_fw2.c ============================================================================== --- stable/7/sys/netinet/ip_fw2.c Thu Mar 5 06:26:08 2009 (r189392) +++ stable/7/sys/netinet/ip_fw2.c Thu Mar 5 07:42:47 2009 (r189393) @@ -146,7 +146,6 @@ struct table_entry { u_int32_t value; }; -static int fw_debug = 1; static int autoinc_step = 100; /* bounded to 1..1000 in add_rule() */ extern int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); @@ -162,8 +161,6 @@ SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, on CTLFLAG_RW | CTLFLAG_SECURE3, &fw_one_pass, 0, "Only do a single pass through ipfw when using dummynet(4)"); -SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW, - &fw_debug, 0, "Enable printing of debug ip_fw statements"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose, CTLFLAG_RW | CTLFLAG_SECURE3, &fw_verbose, 0, "Log matches to ipfw rules"); @@ -2208,6 +2205,7 @@ ipfw_chk(struct ip_fw_args *args) return (IP_FW_PASS); /* accept */ dst_ip.s_addr = 0; /* make sure it is initialized */ + src_ip.s_addr = 0; /* make sure it is initialized */ pktlen = m->m_pkthdr.len; args->f_id.fib = M_GETFIB(m); /* note mbuf not altered) */ proto = args->f_id.proto = 0; /* mark f_id invalid */