From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 22 18:50:16 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4732816A412 for ; Sun, 22 Oct 2006 18:50:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93F0243D53 for ; Sun, 22 Oct 2006 18:50:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9MIoFPi035756 for ; Sun, 22 Oct 2006 18:50:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9MIoFh0035754; Sun, 22 Oct 2006 18:50:15 GMT (envelope-from gnats) Resent-Date: Sun, 22 Oct 2006 18:50:15 GMT Resent-Message-Id: <200610221850.k9MIoFh0035754@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexey Dokuchaev Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F112F16A403 for ; Sun, 22 Oct 2006 18:44:52 +0000 (UTC) (envelope-from danfe@regency.nsu.ru) Received: from mx.nsu.ru (mx.nsu.ru [212.192.164.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A07C43D46 for ; Sun, 22 Oct 2006 18:44:52 +0000 (GMT) (envelope-from danfe@regency.nsu.ru) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.50) id 1GbiJW-0000bb-Gd for FreeBSD-gnats-submit@freebsd.org; Mon, 23 Oct 2006 01:44:50 +0700 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.13.4/8.13.1) with ESMTP id k9MIpOLd024785 for ; Mon, 23 Oct 2006 01:51:24 +0700 (NOVST) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.13.4/8.13.1/Submit) id k9MIpJR9024774; Mon, 23 Oct 2006 01:51:19 +0700 (NOVST) (envelope-from danfe) Message-Id: <200610221851.k9MIpJR9024774@regency.nsu.ru> Date: Mon, 23 Oct 2006 01:51:19 +0700 (NOVST) From: Alexey Dokuchaev To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/104682: Some minor language consistency fixes and whitespace nits X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexey Dokuchaev List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 18:50:16 -0000 >Number: 104682 >Category: kern >Synopsis: Some minor language consistency fixes and whitespace nits >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 22 18:50:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Alexey Dokuchaev >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: Asempra Technologies, Inc. >Environment: >Description: It seems that displaing "ipfw2 .... initalized" upon system startup is useless (our users do not really care about version since there's no ipfw1 in modern versions of FreeBSD). In fact, in FreeBSD 4.x, it was "IP packet filtering" instead of "ipfw2", which is IMHO better. I've tweaked it a bit to turn down chances of consufing IPFW with IPFilter/PF, so basically what I suggest is "IP packet firewall"). Also, what about printing "(+ipv6)" unless we have NO_INET6 defined? I've also fixed EOL whitespace along the way, and consitent use of "IPv6" term in comments (and "... initialized/inloaded" string). My `ip_fw2.c' version: src/sys/netinet/ip_fw2.c,v 1.106.2.20 2006/09/20 19:15:03 jhay >How-To-Repeat: N/A >Fix: --- sys/netinet/ip_fw2.c.orig Tue Oct 3 03:32:49 2006 +++ sys/netinet/ip_fw2.c Mon Oct 23 01:31:01 2006 @@ -514,7 +514,7 @@ /* * The verify_path function checks if a route to the src exists and * if it is reachable via ifp (when provided). - * + * * The 'verrevpath' option checks that the interface that an IP packet * arrives on is the same interface that traffic destined for the * packet's source address would be routed out of. The 'versrcreach' @@ -580,7 +580,7 @@ #ifdef INET6 /* - * ipv6 specific rules here... + * IPv6 specific rules here... */ static __inline int icmp6type_match (int type, ipfw_insn_u32 *cmd) @@ -641,7 +641,7 @@ if (ro.ro_rt == NULL) return 0; - /* + /* * if ifp is provided, check for equality with rtentry * We should use rt->rt_ifa->ifa_ifp, instead of rt->rt_ifp, * to support the case of sending packets to an address of our own. @@ -1042,7 +1042,7 @@ u_int32_t i; #ifdef INET6 - if (IS_IP6_FLOW_ID(id)) + if (IS_IP6_FLOW_ID(id)) i = hash_packet6(id); else #endif /* INET6 */ @@ -1504,7 +1504,7 @@ conn_limit = (cmd->conn_limit == IP_FW_TABLEARG) ? tablearg : cmd->conn_limit; - + DEB( if (cmd->conn_limit == IP_FW_TABLEARG) printf("ipfw: %s: O_LIMIT rule, conn_limit: %u " @@ -1828,7 +1828,7 @@ static int init_tables(struct ip_fw_chain *ch) -{ +{ int i; uint16_t j; @@ -2007,7 +2007,7 @@ *lookup = -1; return (0); } - } + } if (insn->o.opcode == O_UID) match = (ugp->fw_uid == (uid_t)insn->d[0]); else if (insn->o.opcode == O_GID) { @@ -2121,7 +2121,7 @@ * we have a fragment at this offset of an IPv4 packet. * offset == 0 means that (if this is an IPv4 packet) * this is the first or only fragment. - * For IPv6 offset == 0 means there is no Fragment Header. + * For IPv6 offset == 0 means there is no Fragment Header. * If offset != 0 for IPv6 always use correct mask to * get the correct offset because we add IP6F_MORE_FRAG * to be able to dectect the first fragment which would @@ -2162,14 +2162,14 @@ /* * We store in ulp a pointer to the upper layer protocol header. * In the ipv4 case this is easy to determine from the header, - * but for ipv6 we might have some additional headers in the middle. + * but for IPv6 we might have some additional headers in the middle. * ulp is NULL if not found. */ void *ulp = NULL; /* upper layer protocol pointer. */ - /* XXX ipv6 variables */ + /* XXX IPv6 variables */ int is_ipv6 = 0; u_int16_t ext_hd = 0; /* bits vector for extension header filtering */ - /* end of ipv6 variables */ + /* end of IPv6 variables */ int is_ipv4 = 0; if (m->m_flags & M_SKIP_FIREWALL) @@ -4329,8 +4329,11 @@ } ip_fw_default_rule = layer3_chain.rules; - printf("ipfw2 (+ipv6) initialized, divert %s, " - "rule-based forwarding " + printf("IP packet firewall " +#ifdef INET6 + "(+IPv6) " +#endif + "initialized, divert %s, rule-based forwarding " #ifdef IPFIREWALL_FORWARD "enabled, " #else @@ -4397,5 +4400,5 @@ sysctl_ctx_free(&ip6_fw_sysctl_ctx); #endif - printf("IP firewall unloaded\n"); + printf("IP packet firewall unloaded\n"); } >Release-Note: >Audit-Trail: >Unformatted: