From owner-freebsd-net Tue Sep 18 0:58:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from smtp4.ihug.co.nz (smtp4.ihug.co.nz [203.109.252.5]) by hub.freebsd.org (Postfix) with ESMTP id 6ED7C37B416 for ; Tue, 18 Sep 2001 00:58:53 -0700 (PDT) Received: from neoprene (203-173-200-205.nzwide.ihug.co.nz [203.173.200.205]) by smtp4.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id TAA17215 for ; Tue, 18 Sep 2001 19:58:48 +1200 X-Authentication-Warning: smtp4.ihug.co.nz: Host 203-173-200-205.nzwide.ihug.co.nz [203.173.200.205] claimed to be neoprene Message-ID: <001501c14017$9c2e73c0$0a00a8c0@neoprene> From: "Matthew Luckie" To: Subject: arp X moved from Y to Z messages Date: Tue, 18 Sep 2001 19:57:43 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi there At work there are several freebsd machines that route packets through a "load balanced" or "redundant" router configuration. The gateway's IP address actually refers to two different machines. Naturally the gateway is used quite a bit, and the syslog fills up with "arp X moved from Y to Z on fxp0" messages. I'm guessing that not many people would have this problem. Below is a patch that I have found useful for these machines. I'm aware that there are security considerations with this patch; by default the sysctl is not activated. I'm not subscribed to the list, CC me on any responses please. Matthew --- if_ether.c.orig Tue Sep 18 13:56:16 2001 +++ if_ether.c Tue Sep 18 14:27:46 2001 @@ -502,6 +502,12 @@ &log_arp_wrong_iface, 0, "log arp packets arriving on the wrong interface"); +static int log_arp_moved = 1; + +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_moved, CTLFLAG_RW, + &log_arp_moved, 0, + "log arp moved"); + static void in_arpinput(m) struct mbuf *m; @@ -586,12 +592,13 @@ } if (sdl->sdl_alen && bcmp((caddr_t)ea->arp_sha, LLADDR(sdl), sdl->sdl_alen)) { - if (rt->rt_expire) + if (rt->rt_expire) { + if(log_arp_moved) log(LOG_INFO, "arp: %s moved from %6D to %6D on %s%d\n", inet_ntoa(isaddr), (u_char *)LLADDR(sdl), ":", ea->arp_sha, ":", ac->ac_if.if_name, ac->ac_if.if_unit); - else { + } else { log(LOG_ERR, "arp: %6D attempts to modify permanent entry for %s on %s%d\n", ea->arp_sha, ":", inet_ntoa(isaddr), To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message