Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2001 17:32:27 -0800 (PST)
From:      Paul Herman <pherman@frenchfries.net>
To:        <freebsd-net@freebsd.org>
Cc:        <freebsd-alpha@freebsd.org>
Subject:   arp_rtrequest: bad gateway value
Message-ID:  <20011121171802.P23581-100000@tick.sc.omation.com>

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




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