Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 May 95 15:51:15 +0800
From:      vvdav@hq.sonet.kemerovo.su (Vladimir V. Davydoff)
To:        paulus@cs.anu.edu.au
Cc:        freebsd-bugs@FreeBSD.org
Subject:   pppd & proxyarp & BSD
Message-ID:  <AAp17il0A5@hq.sonet.kemerovo.su>

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




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