From owner-freebsd-net Wed Nov 21 17:37:37 2001 Delivered-To: freebsd-net@freebsd.org Received: from mailrelay.netcologne.de (mailrelay.netcologne.de [194.8.194.96]) by hub.freebsd.org (Postfix) with ESMTP id 2BFD037B405; Wed, 21 Nov 2001 17:37:28 -0800 (PST) Received: from design.freestyling.de (design.freestyling.de [195.14.253.182]) by mailrelay.netcologne.de (8.11.6/8.11.6) with ESMTP id fAM1bN728389; Thu, 22 Nov 2001 02:37:23 +0100 (MET) X-Received: from tick.sc.omation.com (64-58-167-31.cbi.cox-oc.net [64.58.167.31] (may be forged)) by design.freestyling.de (8.11.3/8.11.3) with ESMTP id fAM1cR279675 for ; Thu, 22 Nov 2001 02:38:28 +0100 (CET) (envelope-from pherman@omation.com) X-Received: from tick.sc.omation.com (tick.sc.omation.com [192.168.128.2]) by tick.sc.omation.com (8.11.6/8.11.6) with ESMTP id fAM1YTB31405 for ; Wed, 21 Nov 2001 17:34:29 -0800 (PST) (envelope-from pherman@omation.com) Date: Wed, 21 Nov 2001 17:32:27 -0800 (PST) From: Paul Herman X-X-Sender: To: Cc: Subject: arp_rtrequest: bad gateway value Message-ID: <20011121171802.P23581-100000@tick.sc.omation.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-ReSent-Date: Wed, 21 Nov 2001 17:34:22 -0800 (PST) X-ReSent-From: Paul Herman X-ReSent-To: X-ReSent-Subject: arp_rtrequest: bad gateway value X-ReSent-Message-ID: <20011121173422.C23581@tick.sc.omation.com> 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, I'd like to pick some brains before I file a PR. I've got 4.4-RELEASE running on FreeBSD-alpha with more than one alias on my network interface. I decided to try out routed, and started noticing gobs and gobs of messages: Nov 15 11:38:10 tick /kernel: arp_rtrequest: bad gateway value Nov 15 11:43:10 tick /kernel: arp_rtrequest: bad gateway value Nov 15 11:47:59 tick /kernel: arp_rtrequest: bad gateway value Nov 15 11:58:02 tick last message repeated 2 times Nov 15 12:08:10 tick last message repeated 2 times Nov 15 12:18:10 tick last message repeated 2 times It turns out, this is caused by a bad arp entry: 17:21:33{{ttyq8}pherman@tick}~//> arp -a ns1.sc.omation.com (192.168.128.1) at 0:0:0:0:0:0 permanent [ethernet] rt=200 tick.sc.omation.com (192.168.128.2) at 0:60:97:6e:6e:92 permanent [ethernet] [...etc...] Trying to delete the entry gives me "cannot locate 192.168.128.1", probably because the kernel thinks it doesn't exist becase the MAC addr == NULL... ...perhaps (?) Whatever, it shouldn't be there in the first place. So, I've narrowed this down to when routed it writes RTM_CHANGE of type RTF_HOST in sbin/routed/table.c:725 if (mask == HOST_MASK) { w.w_rtm.rtm_flags |= RTF_HOST; w.w_rtm.rtm_msglen -= sizeof(w.w_mask); } else { w.w_rtm.rtm_addrs |= RTA_NETMASK; w.w_mask.sin_addr.s_addr = htonl(mask); Something is going haywire (64bit issues?) because when I change this to if (mask == HOST_MASK && 0) { it works fine, but I'm sure I'm breaking something. :-) There *is* a sizeof(long) just after it on line 734 which should be a sizeof(u_int32_t), but that doesn't change anything in this case. This obviously works fine on 32-bit architectures, so I'm thinking it's some kind of alignment or sizeof problem, but I don't see it. Can anyone comment on this? -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message