From owner-freebsd-hackers Tue Jul 20 8:42:38 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from oskar.nanoteq.co.za (oskar.nanoteq.co.za [196.37.91.10]) by hub.freebsd.org (Postfix) with ESMTP id D1EA51534C for ; Tue, 20 Jul 1999 08:42:14 -0700 (PDT) (envelope-from rbezuide@oskar.nanoteq.co.za) Received: (from rbezuide@localhost) by oskar.nanoteq.co.za (8.9.0/8.9.0) id RAA02634 for freebsd-hackers@freebsd.org; Tue, 20 Jul 1999 17:42:33 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <199907201542.RAA02634@oskar.nanoteq.co.za> Subject: if_dl.h in stable causes sendmail segmentation To: freebsd-hackers@freebsd.org Date: Tue, 20 Jul 1999 17:42:31 +0200 (SAT) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi ... I have the following situation... A machine running a 3.2-STABLE of a few weeks ago ... When the machine booted I saw that newaliases (sendmail -bi) exited with a segmentation fault. I further inspected and found that if I do a ifconfig of a interface (fxp0 or de0) newaliases is ok, but when I do an ifconfig fxp0 delete the newaliases exits on a segmentation fault. e.g. --------------------- Amnesiac# ifconfig -au de0: flags=8843 mtu 1500 inet 196.37.91.253 netmask 0xffffff00 broadcast 196.37.91.255 ether 00:e0:29:00:e5:19 media: autoselect (10baseT/UTP) status: active supported media: autoselect 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 Amnesiac# newaliases /etc/aliases: 19 aliases, longest 10 bytes, 190 bytes total Amnesiac# ifconfig de0 delete Amnesiac# newaliases Segmentation fault Amnesiac# ifconfig de0 up Amnesiac# newaliases /etc/aliases: 19 aliases, longest 10 bytes, 190 bytes total Amnesiac# ---------------------- I then used the kernel sources from a few weeks after the 3.2-RELEASE and compiled the kernel - now everything works ok ... no segmentation fault. I eventually traced the problem down to the following header file /usr/src/sys/net/if_dl.h If I use the old header file ... no problem ... use the latest one .. sendmail crashes (and looks like gated also does this). Here is the diff jarrow# diff -c if_dl.h ../../sys.new/net/if_dl.h *** if_dl.h Tue Jul 20 16:18:54 1999 --- ../../sys.new/net/if_dl.h Thu May 27 05:06:41 1999 *************** *** 31,37 **** * SUCH DAMAGE. * * @(#)if_dl.h 8.1 (Berkeley) 6/10/93 ! * $Id: if_dl.h,v 1.6 1997/02/22 09:41:00 peter Exp $ */ #ifndef _NET_IF_DL_H_ --- 31,37 ---- * SUCH DAMAGE. * * @(#)if_dl.h 8.1 (Berkeley) 6/10/93 ! * $Id: if_dl.h,v 1.6.4.1 1999/05/27 03:06:41 julian Exp $ */ #ifndef _NET_IF_DL_H_ *************** *** 68,73 **** --- 68,75 ---- u_char sdl_slen; /* link layer selector length */ char sdl_data[12]; /* minimum work area, can be larger; contains both if name and ll address */ + u_short sdl_rcf; /* source routing control */ + u_short sdl_route[16]; /* source routing information */ }; #define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen)) ---------------------- Looks like the addition of the two last entries in the structure is the problem ?? Any ideas ?? Sendmail crashes in the routine in conf.c called "load_if_names()" where it cycles through the interfaces round line 4444 if (sa->sa.sa_len > sizeof ifr->ifr_addr) the address sa->sa seems to point so where If you want any more info .. just ask :) Thanx Reinier To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message