From owner-cvs-all Fri Jun 16 13:32: 0 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A96AC37B680; Fri, 16 Jun 2000 13:31:55 -0700 (PDT) (envelope-from kris@FreeBSD.org) Received: from localhost (kris@localhost) by freefall.freebsd.org (8.9.3/8.9.2) with ESMTP id NAA14622; Fri, 16 Jun 2000 13:31:55 -0700 (PDT) (envelope-from kris@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: kris owned process doing -bs Date: Fri, 16 Jun 2000 13:31:55 -0700 (PDT) From: Kris Kennaway To: Bill Paul Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys sockio.h src/sys/net if.c src/sbin/ifconfig ifconfig.8 ifconfig.c In-Reply-To: <200006162014.NAA12344@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I wonder if there's an argument for making this protected at high securelevels? Or would that be pointless since there's another way for root to do this under securelevel? Kris On Fri, 16 Jun 2000, Bill Paul wrote: > wpaul 2000/06/16 13:14:43 PDT > > Modified files: > sys/sys sockio.h > sys/net if.c > sbin/ifconfig ifconfig.8 ifconfig.c > Log: > Implement SIOCSIFLLADDR, which allows you to change the link-level > address on an interface. This basically allows you to do what my > little setmac module/utility does via ifconfig. This involves the > following changes: > > socket.h: define SIOCSIFLLADDR > if.c: add support for SIOCSIFLLADDR, which resets the values in > the arpcom struct and sockaddr_dl for the specified interface. > Note that if the interface is already up, we need to down/up > it in order to program the underlying hardware's receive filter. > ifconfig.c: add lladdr command > ifconfig.8: document lladdr command > > You can now force the MAC address on any ethernet interface to be > whatever you want. (The change is not sticky across reboots of course: > we don't actually reprogram the EEPROM or anything.) Actually, you > can reprogram the MAC address on other kinds of interfaces too; this > shouldn't be ethernet-specific (though at the moment it's limited to > 6 bytes of address data). > > Nobody ran up to me and said "this is the politically correct way to > do this!" so I don't want to hear any complaints from people who think > I could have done it more elegantly. Consider yourselves lucky I didn't > do it by having ifconfig tread all over /dev/kmem. > > Revision Changes Path > 1.15 +2 -1 src/sys/sys/sockio.h > 1.87 +31 -1 src/sys/net/if.c > 1.29 +11 -1 src/sbin/ifconfig/ifconfig.8 > 1.52 +27 -2 src/sbin/ifconfig/ifconfig.c > > > -- In God we Trust -- all others must submit an X.509 certificate. -- Charles Forsythe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message