From owner-FreeBSD-users-jp@jp.FreeBSD.org Thu Jun  6 03:19:15 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g55IJFB37700;
	Thu, 6 Jun 2002 03:19:15 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from lamhirh.mahoro.org (lamhirh.misya.net [210.224.180.192] (may be forged))
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g55IJCv37693
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Thu, 6 Jun 2002 03:19:13 +0900 (JST)
	(envelope-from watanabe@mahoro.org)
Received: (qmail 40939 invoked from network); 5 Jun 2002 18:19:08 -0000
Received: from unknown (HELO ayana) (61.198.165.122)
  by lamhirh.mahoro.org with SMTP; 5 Jun 2002 18:19:08 -0000
Date: Thu, 06 Jun 2002 03:19:11 +0900
From: Yusuke Watanabe <watanabe@mahoro.org>
To: FreeBSD-users-jp@jp.FreeBSD.org
In-Reply-To: <200206051727.AA00271@sakura.don.am>
References: <200206051727.AA00271@sakura.don.am>
Message-Id: <20020606030319.5AF2.WATANABE@mahoro.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver. 2.00.10
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: FreeBSD-users-jp 69043
Subject: [FreeBSD-users-jp 69043] Re: arp moved... on sakura  (
 =?ISO-2022-JP?B?GyRCMGxITBsoQg==?=
 =?ISO-2022-JP?B?GyRCJWYhPCU2JE4lVyVtJXMlVyVIJCwhVhsoQg==?= #
 =?ISO-2022-JP?B?GyRCIVcbKEI=?=)
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: watanabe@mahoro.org

$BEOJU$G$9!#(B


Subject:    [FreeBSD-users-jp 69036] arp moved... on sakura  ( $B0lHL%f!<(B
$B%6$N%W%m%s%W%H$,!V(B # $B!W(B)
Date:       Thu, 06 Jun 2002 02:27:55 +0900
From:       Kiyotaka Doumae <don@don.am>
Message-ID: 200206051727.AA00271@sakura.don.am


> $BA[A|$@$1$J$s$G$9$,!"BQ>c32@-3NJ]$+Ii2YJ,;6$+$G%m!<%I%P%i%s%5$N$h$&$J(B
> $B$b$N$G$bF~$l$F$$$k$N$+$bCN$l$^$;$s$M!#(B

$B%k!<%?$N>iD92=$K(B VRRP(Virtual Router Redundancy Protocol) $B$r;H$C$F$k$;$$(B
$B$i$7$$$G$9!#(B


> $B!&(Bkernel$B$N%=!<%9$K<j$rF~$l$FL[$i$9(B

$BEvJ}$G$O!"(B5$B7nF,$N(B RELENG_4 $B$K0J2<$N$h$&$J%Q%C%A$rEv$F$F(B
/etc/sysctl.conf $B$K(B net.link.ether.inet.log_arp_address_moved=0
$B$rDI2C$7$F$$$^$9!#(B


--- sys/netinet/if_ether.c.orig	Thu Mar 28 01:40:59 2002
+++ sys/netinet/if_ether.c	Tue May 21 05:01:21 2002
@@ -562,6 +562,12 @@
 	&log_arp_wrong_iface, 0,
 	"log arp packets arriving on the wrong interface");
 
+static int log_arp_address_moved = 1;
+
+SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_address_moved, CTLFLAG_RW,
+	&log_arp_address_moved, 0,
+	"log MAC address changed");
+
 static void
 in_arpinput(m)
 	struct mbuf *m;
@@ -664,13 +670,14 @@
 		}
 		if (sdl->sdl_alen &&
 		    bcmp(ar_sha(ah), LLADDR(sdl), sdl->sdl_alen)) {
-			if (rt->rt_expire)
-			    log(LOG_INFO, "arp: %s moved from %*D to %*D on %s%d\n",
-				inet_ntoa(isaddr),
-				ifp->if_addrlen, (u_char *)LLADDR(sdl), ":",
-				ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
-				ifp->if_name, ifp->if_unit);
-			else {
+			if (rt->rt_expire) {
+			    if (log_arp_address_moved)
+				log(LOG_INFO, "arp: %s moved from %*D to %*D on %s%d\n",
+				    inet_ntoa(isaddr),
+				    ifp->if_addrlen, (u_char *)LLADDR(sdl), ":",
+				    ifp->if_addrlen, (u_char *)ar_sha(ah), ":",
+				    ifp->if_name, ifp->if_unit);
+			} else {
 			    log(LOG_ERR,
 				"arp: %*D attempts to modify permanent entry for %s on %s%d\n",
 				ifp->if_addrlen, (u_char *)ar_sha(ah), ":",

