Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 2010 02:28:52 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Gleb Smirnoff <glebius@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
Message-ID:  <20100104232852.GA14676@edoofus.dev.vega.ru>
In-Reply-To: <200912021324.nB2DOLuO006676@svn.freebsd.org>
References:  <200912021324.nB2DOLuO006676@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100104232852.GA14676>