From owner-freebsd-bugs Wed Aug 28 4:10:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C8A937B400 for ; Wed, 28 Aug 2002 04:10:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50EFF43E7B for ; Wed, 28 Aug 2002 04:10:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7SBA4JU044295 for ; Wed, 28 Aug 2002 04:10:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7SBA4Hd044294; Wed, 28 Aug 2002 04:10:04 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D91E637B400 for ; Wed, 28 Aug 2002 04:08:50 -0700 (PDT) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E7E43E77 for ; Wed, 28 Aug 2002 04:08:48 -0700 (PDT) (envelope-from eugen@www.svzserv.kemerovo.su) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.12.5/8.12.5) with ESMTP id g7SB8iie055927 for ; Wed, 28 Aug 2002 19:08:44 +0800 (KRAST) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.12.5/8.12.5/Submit) id g7SB8hLh055925; Wed, 28 Aug 2002 19:08:43 +0800 (KRAST) Message-Id: <200208281108.g7SB8hLh055925@www.svzserv.kemerovo.su> Date: Wed, 28 Aug 2002 19:08:43 +0800 (KRAST) From: Eugene Grosbein Reply-To: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/42120: arp(8) fails due to ioctl SIOCGIFNETMASK failure Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 42120 >Category: kern >Synopsis: arp(8) fails due to ioctl SIOCGIFNETMASK failure >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 28 04:10:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 4.6-STABLE i386 >Organization: Svyaz Service JSC >Environment: System: FreeBSD 4.6-STABLE >Description: We have an ARP-proxy gateway box that used to announce its MAC address for number of IP addresses. It translates them using natd then. It ran 3.x for years without a problem. Today I've upgraded it to 4.6-STABLE, all services run find except of ARP proxying. This interface (fxp0) has an alias with netmask 0xffffffff. ifconfig fxp0 shows alias before primary ip address that has netmask 0xffffff00, it does this for unknown reason as my rc.conf is the same. Well, that's basically OK exect of the fact that 'arp client_ip auto pub' cannot find interface in this case. >How-To-Repeat: Suppose we have fxp0 without IP address. Let's see: # ifconfig fxp0 fxp0: flags=8843 mtu 1500 ether 00:90:27:35:05:1b media: Ethernet autoselect (100baseTX ) status: active # ifconfig fxp0 inet 190.0.0.1 netmask 0xffffff00 # ifconfig fxp0 inet 190.0.0.2 netmask 0xffffffff alias # ifconfig fxp0 fxp0: flags=8843 mtu 1500 inet 190.0.0.1 netmask 0xffffff00 broadcast 190.0.0.255 inet 190.0.0.2 netmask 0xffffffff broadcast 190.0.0.2 ether 00:90:27:35:05:1b media: Ethernet autoselect (100baseTX ) status: active # arp -a -d # arp -s 190.0.0.3 auto pub using interface fxp0 for proxy with address 00:90:27:35:05:1b # ping -c 1 190.0.0.1 PING 190.0.0.1 (190.0.0.1): 56 data bytes 64 bytes from 190.0.0.1: icmp_seq=0 ttl=64 time=0.295 ms --- 190.0.0.1 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.295/0.295/0.295/0.000 ms # arp -a -n ? (190.0.0.1) at 00:90:27:35:05:1b on fxp0 permanent [ethernet] ? (190.0.0.3) at 00:90:27:35:05:1b on fxp0 permanent published [ethernet] That's what expected. Now clean up and start from beginning. # ifconfig fxp0 delete # ifconfig fxp0 delete # arp -a -d # ifconfig fxp0 fxp0: flags=8843 mtu 1500 ether 00:90:27:35:05:1b media: Ethernet autoselect (100baseTX ) status: active But now make it go backwards (I don't know why it came to be in this way for my real box): # ifconfig fxp0 inet 190.0.0.2 netmask 0xffffffff # ifconfig fxp0 inet 190.0.0.1 netmask 0xffffff00 alias # ifconfig fxp0 fxp0: flags=8843 mtu 1500 inet 190.0.0.2 netmask 0xffffffff broadcast 190.0.0.2 inet 190.0.0.1 netmask 0xffffff00 broadcast 190.0.0.255 ether 00:90:27:35:05:1b media: Ethernet autoselect (100baseTX ) status: active That's what I see after my box is loaded. Now try to play with ARP. # arp -a -d # arp -s 190.0.0.3 auto pub no interface found for 190.0.0.3 arp(8) now cannot find an interface. I digged it for little and see that ioctl(sock,SIOCGIFNETMASK,&ifreq) returns 0xffffffff twice for netmask, it does not return 0xffffff00 so its really not arp's fault. >Fix: Unknown for me. I was forced to rewrite my file for arp -f to not use 'auto' and use real MAC of fxp0 instead. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message