Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site oddjob.UChicago.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!oddjob!matt From: matt@oddjob.UChicago.UUCP (Matt Crawford) Newsgroups: net.bugs.4bsd Subject: 4.2bsd route daemon error -- flags botched Message-ID: <575@oddjob.UChicago.UUCP> Date: Tue, 22-Jan-85 17:42:19 EST Article-I.D.: oddjob.575 Posted: Tue Jan 22 17:42:19 1985 Date-Received: Wed, 23-Jan-85 19:28:18 EST Reply-To: matt@oddjob.UUCP (Matt Crawford) Organization: U. Chicago: Astronomy & Astrophysics Lines: 59 Index: etc/routed/startup.c 4.2BSD Description: The high 3 bits of the interface flags should be masked off before being used in routed's tables. Otherwise the bits for IFF_NOTRAILERS, IFF_RUNNING, and IFF_NOARP will be mistaken for RTS_PASSIVE, RTS_INTERFACE, and RTS_REMOTE respectively. Repeat-By: Turn off trailers on an ethernet which out to receive routing broadcasts, then start routed. Fix: *** /tmp/,RCSt1003118 Tue Jan 22 16:30:15 1985 --- startup.c Sat Jan 19 16:04:56 1985 *************** *** 1,6 #ifndef lint static char sccsid[] = "@(#)startup.c 4.4 (Berkeley) 5/25/83"; #endif /* * Routing Table Management Daemon --- 1,15 ----- #ifndef lint static char sccsid[] = "@(#)startup.c 4.4 (Berkeley) 5/25/83"; #endif + /* $Header: startup.c,v 1.2 85/01/19 16:02:49 bin Exp $ + * $Log: startup.c,v $ + * Revision 1.2 85/01/19 16:02:49 bin + * Mask out the high 3 bits of the interface flags from the kernel. + * The bits for IFF_NOTRAILERS, IFF_RUNNING, and IFF_NOARP were being + * mistaken for RTS_PASSIVE, RTS_INTERFACE, and RTS_REMOTE respectively. + * + * 1.1 == 4.2 distribution + */ /* * Routing Table Management Daemon *************** *** 102,108 } strcpy(ifp->int_name, name); ifp->int_addr = ifs.if_addr; ! ifp->int_flags = ifs.if_flags | IFF_INTERFACE; /* this works because broadaddr overlaps dstaddr */ ifp->int_broadaddr = ifs.if_broadaddr; ifp->int_net = ifs.if_net; --- 111,117 ----- } strcpy(ifp->int_name, name); ifp->int_addr = ifs.if_addr; ! ifp->int_flags = (ifs.if_flags & 0x1f) | IFF_INTERFACE; /* this works because broadaddr overlaps dstaddr */ ifp->int_broadaddr = ifs.if_broadaddr; ifp->int_net = ifs.if_net; _____________________________________________________ Matt University crawford@anl-mcs.arpa Crawford of Chicago ihnp4!oddjob!matt