Date: Fri, 21 Apr 2000 11:19:24 -0700 (PDT) From: Ken Key <key@Network-Alchemy.COM> To: FreeBSD-gnats-submit@freebsd.org Subject: misc/18131: pppd - MAX_IFS in sys-bsd.c too small for most GENERIC-based kernels. Message-ID: <200004211819.LAA02934@lithium.network-alchemy.com>
next in thread | raw e-mail | index | archive | help
>Number: 18131
>Category: misc
>Synopsis: MAX_IFS in pppd/sys-bsd.c too small for most GENERIC-based kernels today.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 21 11:20:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Ken Key
>Release: FreeBSD 4.0-RELEASE i386
>Organization:
Network Alchemy
>Environment:
Sony VIAO 505TX with a WaveLAN Turbo PCMCIA card using a mostly
GENERIC kernel.
>Description:
In pppd/sys-bsd.c, MAX_IFS for get_ether_addr() is set to 32, which would
seem a goodly number of interfaces. However, since the INET6 addresses
are bigger than struct sockaddr in ifreq, this gets truncated with only
11 interfaces (in my case). The symptom is that a PCCARD ethernet (WaveLAN)
adapter that is the currently active interface but at the end of the interface
list is left off and pppd, which it tries to set the proxy ARP cannot
determine what interface to use. Since INET6 is on turned on in the
default (GENERIC) kernel, we should probably make the rest of the OS still
function in that environment.
>How-To-Repeat:
Create a GENERIC kernel with a couple of ethernet interfaces, most notably
a PCCARD interface so it will be at the end of the list. Here is my
ifconfig -a output:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::a00:46ff:fe05:84cc%fxp0 prefixlen 64 scopeid 0x1
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
ether 08:00:46:05:84:cc
media: autoselect status: no carrier
supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
ppp0: flags=8151<UP,POINTOPOINT,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 10.0.4.46 --> 10.0.4.91 netmask 0xfffffe00
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
inet6 fe80::a00:46ff:fe05:84cc%gif0 prefixlen 64 scopeid 0x6
gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
inet6 fe80::a00:46ff:fe05:84cc%gif1 prefixlen 64 scopeid 0x7
gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
inet6 fe80::a00:46ff:fe05:84cc%gif2 prefixlen 64 scopeid 0x8
gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
inet6 fe80::a00:46ff:fe05:84cc%gif3 prefixlen 64 scopeid 0x9
stf0: flags=8000<MULTICAST> mtu 1280
inet6 fe80::a00:46ff:fe05:84cc%stf0 prefixlen 64 scopeid 0xa
faith0: flags=8000<MULTICAST> mtu 1500
wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::260:1dff:fef0:e544%wi0 prefixlen 64 scopeid 0xc
inet 10.0.4.46 netmask 0xfffffe00 broadcast 10.0.5.255
ether 00:60:1d:f0:e5:44
>Fix:
Short term, bump MAX_IFS to some larger number - 128 worked for me.
Longer term, make allocation dynamically sized and retry ifconf's
until all is retrieved. Even longer term, move to sysctl() and
NET_RT_IFLIST.
I noticed that sbin/arp.c also has MAX_IFS set to 32 and will most
likely suffer a similar problem. A quick grep of the source tree shows
is in very heavy use.
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004211819.LAA02934>
