Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: My rwhod don't - Part II Keywords: This time it's personal... Message-ID: <16142@mimsy.UUCP> Date: 28 Feb 89 11:47:42 GMT References: <516@qvax2.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 30 In article <516@qvax2.UUCP> israel@qvax2.UUCP (Renegade@ex2564) writes: > In examining the driver code, it appears that the IFF_BROADCAST flag >is supposed to be set during ioctl SIOCIFADDR calls ... No: it is supposed to be set at boot time, then never cleared. > If any of you wizard types out there can tell me where I'm losing my >IFF_BROADCAST flag, please drop me a line. You must still be running 4.2BSD. (Astounding.) There is a bug in /sys/net/if.c ifioctl(). Under case SIOCSIFFLAGS, there is a line like ifp->if_flags = ifr->ifr_flags; which should in fact read ifp->if_flags = (ifp->if_flags & IFF_CANTCHANGE) | (ifr->ifr_flags &~ IFF_CANTCHANGE); where IFF_CANTCHANGE is #define IFF_CANTCHANGE (IFF_BROADCAST | IFF_POINTOPOINT | IFF_RUNNING) so that /etc/ifconfig (and anyone else) cannot alter these flags. (There should also be a suser() check; I seem to recall that 4.2BSD let anyone configure an interface down.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris