From owner-freebsd-bugs Mon Jul 9 8:40:11 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EDE0E37B410 for ; Mon, 9 Jul 2001 08:40:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f69Fe7L83168; Mon, 9 Jul 2001 08:40:07 -0700 (PDT) (envelope-from gnats) Date: Mon, 9 Jul 2001 08:40:07 -0700 (PDT) Message-Id: <200107091540.f69Fe7L83168@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/28833; it has been noted by GNATS. From: Peter Pentchev To: Mark Blackman Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: bin/28833: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask Date: Mon, 9 Jul 2001 18:43:38 +0300 On Mon, Jul 09, 2001 at 06:39:50PM +0300, Peter Pentchev wrote: > On Mon, Jul 09, 2001 at 08:16:15AM -0700, Mark Blackman wrote: > > > > >Number: 28833 > > >Category: bin > > >Synopsis: ifconfig if0 netmask xxx.xxx.xxx.0 doesn't change the netmask > > >Environment: > > System: FreeBSD amoeba.ch.dircon.net 4.3-STABLE FreeBSD 4.3-STABLE #1: Thu May 24 13:03:35 BST 2001 root@admi > > n4.dircon.net:/usr/obj/usr/src/sys/AMOEBA i386 > > >Description: > > "ifconfig ep0 netmask 255.255.240.0" has no effect on the netmask for ep0 > > > > This did work in FreeBSD-4.2 RELEASE. I suspect this is connnected with ifconfig changes, but I couldn't track it down. It looked like it shouldn't work in 4.2 either, but it does. > > It works for me, if I also specify the IP address to change the netmask for. > Consider a case where there are multiple IP addresses on a single interface; > ifconfig should probably spit out an error instead of doing nothing, but > it should most definitely not change the netmask on *all* addresses, and > I guess it was considered unsafe to make it just change the netmask on > the first address. Ah; I actually see that you already knew that - 'only way to change netmask is via address setting as well'. Well, once again, I don't think it would be safe to change just the netmask on the first address, or on all of them. Think aliases - several IP addresses on the same network on the same NIC; or think subnets - several logical networks on the same physical network, and a machine on more than one of the logical nets. Though I guess ifconfig(8) could somehow error out, instead of failing silently. I'll look into this. G'luck, Peter -- I am the meaning of this sentence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message