From owner-freebsd-hackers Wed Jul 28 8:18:43 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.128.198]) by hub.freebsd.org (Postfix) with ESMTP id AFF5614D85 for ; Wed, 28 Jul 1999 08:18:39 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from keep.lan.Awfulhak.org (localhost [127.0.0.1]) by storm.FreeBSD.org.uk (8.9.3/8.9.3) with ESMTP id QAA01800; Wed, 28 Jul 1999 16:17:59 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from keep.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by keep.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id QAA03664; Wed, 28 Jul 1999 16:18:33 +0100 (BST) (envelope-from brian@keep.lan.Awfulhak.org) Message-Id: <199907281518.QAA03664@keep.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Reinier Bezuidenhout Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: newaliases and 256 tun devices In-reply-to: Your message of "Sat, 28 Jul 1999 13:57:18 +0200." <199907281157.NAA00418@oskar.nanoteq.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 28 Jul 1999 16:18:33 +0100 From: Brian Somers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG If it's of any use, I have 300 tun devices in my home development machine and have no problems with sendmail, but I have a tulip card (de) rather than an Intel and haven't every ``ifconfig delete''d it. > Hi ... > > > I previously mailed the same error ... and then I thought > it was a "miss-corrolation" between kernel sources and > userland. Since then I built a SNAP of 990726 sources > and tried the same thing and the error occured again . > > Same sources used for the compile of the kernel and userlevel > binaries. > > I've now traced the following down ... it has something todo > with the changes in net/if_dl.h (the entries added for > source routing and the fact that my kernel has > pseudo-device tun 255 > in the config. > > Setup. > PII400 / Asus P2-99 990726 SNAP / fxp and de0 cards. > > When I do a "ifconfig fxp0 delete" and then a newaliases > the newaliases exits with a segmentation failt. > If I reconfig the device or up the device ... newaliases works > ok. > > I then built a kernel with only 200 tun devices. Then newaliases > works everytime. It seems that gated also suffers from the same > problem in that if no device is configured it exits on signal 6 > (core dumped) > > Just for reference this works fine on a 2.2.7/8 FreeBSD without > any problems ... > > The problem seems to be in conf.c of sendmail round line 4429 > if there is 255 tun devices the for loop below only gets to > 234 +/- and then doesn't check anything further and crashes > (but only if the working interface is deleted) > gdb shows that the pointer *sa points to somewhere wonderful :) > It must have something todo with the moving of this pointer > through the list ??? > > Was anything changed for the amount of tun devices allowed ?? > > for (i = 0; i < ifc.ifc_len; ) > { > struct ifreq *ifr = (struct ifreq *) &ifc.ifc_buf[i]; > SOCKADDR *sa = (SOCKADDR *) &ifr->ifr_addr; > struct in_addr ia; > #ifdef SIOCGIFFLAGS > struct ifreq ifrf; > #endif > char ip_addr[256]; > extern char *inet_ntoa(); > > #ifdef BSD4_4_SOCKADDR > if (sa->sa.sa_len > sizeof ifr->ifr_addr) > i += sizeof ifr->ifr_name + sa->sa.sa_len; > else > #endif > i += sizeof *ifr; > > if (tTd(0, 20)) > printf("%s\n", anynet_ntoa(sa)); > > > > Thanx > Reinier -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message