From owner-freebsd-bugs Wed May 10 01:04:31 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id BAA12239 for bugs-outgoing; Wed, 10 May 1995 01:04:31 -0700 Received: from hq.sonet.kemerovo.su (hq.sonet.kemerovo.su [193.124.188.65]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id BAA12190 for ; Wed, 10 May 1995 01:03:48 -0700 Received: by hq.sonet.kemerovo.su id PAA06172; (8.6.9/vak/1.8r) Wed, 10 May 1995 15:51:18 +0800 To: paulus@cs.anu.edu.au Cc: freebsd-bugs@FreeBSD.org Message-ID: Organization: SoNet Systems Co., Ltd. From: vvdav@hq.sonet.kemerovo.su (Vladimir V. Davydoff) Date: Wed, 10 May 95 15:51:15 +0800 X-Mailer: BML [UNIX Beauty Mail v.1.39] Subject: pppd & proxyarp & BSD Sender: bugs-owner@FreeBSD.org Precedence: bulk A little :-) bug was found in ppp-2.1.2/sys-bsd.c. It prevents 'proxyarp' options to work. Bug is in get_ether_address(), in getting interface netmask. Netmask is got from kernel, but doesn't used. --- ppp-2.1.2/sys-bsd.c 685,693 --- > /* > * Get its netmask and check that it's on the right subnet. > */ > if (ioctl(s, SIOCGIFNETMASK, &ifreq) < 0) > continue; Now we get right netmask of ethernet. > mask = ((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr; ^^^^^^ Now we use not netmask, but the ethernet address. Need '&ifreq.'. > if ((ipaddr & mask) != (ina & mask)) > continue; Some addresses work but some not, has infinitive loop. Depend on result of AND operation between two addresses :-) Load average up, pppd doesn't die after disconnecting... Sorry for my English.