From owner-svn-src-head@FreeBSD.ORG Mon Jan 4 23:29:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29FBC1065672; Mon, 4 Jan 2010 23:29:05 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id D8E738FC15; Mon, 4 Jan 2010 23:29:04 +0000 (UTC) Authentication-Results: mail.vega.ru; dkim=unverified, header.i=@FreeBSD.org Authentication-Results: mail.vega.ru; domainkeys=; header.sender= Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NRwMB-0001q7-Dx; Tue, 05 Jan 2010 02:29:03 +0300 Date: Tue, 5 Jan 2010 02:28:52 +0300 From: Ruslan Ermilov To: Gleb Smirnoff Message-ID: <20100104232852.GA14676@edoofus.dev.vega.ru> References: <200912021324.nB2DOLuO006676@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912021324.nB2DOLuO006676@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r200026 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 23:29:05 -0000 On Wed, Dec 02, 2009 at 01:24:21PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Dec 2 13:24:21 2009 > New Revision: 200026 > URL: http://svn.freebsd.org/changeset/base/200026 > > Log: > Until this moment carp(4) used a strange logging priority. It used debug > priority for such important information as MASTER/BACKUP state change, > and used a normal logging priority for such innocent messages as receiving > short packet (which is a normal VRRP packet between some other routers) or > receving a CARP packet on non-carp interface (someone else running CARP). > > This commit shifts message logging priorities to a more sane default. > > Modified: > head/sys/netinet/ip_carp.c I was wondering why I get these "carp_input: packet received on non-carp interface: %s" messages on FreeBSD 8 and not on FreeBSD 7. This is because ip_input() no longer filters multicast datagrams itself. "Protocols must perform their own filtering and update statistics accordingly." Anyway, this change went undocumented and I think it's partly inconsistent. Here's a proposed patch: %%% Index: sys/netinet/ip_carp.c =================================================================== --- sys/netinet/ip_carp.c (revision 201533) +++ sys/netinet/ip_carp.c (working copy) @@ -560,7 +560,7 @@ /* verify that the IP TTL is 255. */ if (ip->ip_ttl != CARP_DFLTTL) { CARPSTATS_INC(carps_badttl); - CARP_LOG("carp_input: received ttl %d != 255i on %s\n", + CARP_DEBUG("carp_input: received ttl %d != 255 on %s\n", ip->ip_ttl, m->m_pkthdr.rcvif->if_xname); m_freem(m); @@ -739,7 +739,7 @@ CARPSTATS_INC(carps_badauth); SC2IFP(sc)->if_ierrors++; CARP_UNLOCK(ifp->if_carp); - CARP_LOG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); + CARP_DEBUG("%s: incorrect hash\n", SC2IFP(sc)->if_xname); m_freem(m); return; } Index: share/man/man4/carp.4 =================================================================== --- share/man/man4/carp.4 (revision 201533) +++ share/man/man4/carp.4 (working copy) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2006 +.Dd January 5, 2010 .Dt CARP 4 .Os .Sh NAME @@ -118,12 +118,12 @@ Disabled by default. .It Va net.inet.carp.log Value of 0 disables any logging. -Value of 1 enables logging of bad +Value of 1 enables logging state changes of .Nm +interfaces. +Values above 1 enable logging of bad +.Nm packets. -Values above 1 enable logging state changes of -.Nm -interfaces. Default value is 1. .It Va net.inet.carp.arpbalance Balance local traffic using ARP (see below). %%% Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer