Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Feb 2007 16:06:56 -0500
From:      Kevin Way <kevin@insidesystems.net>
To:        freebsd-stable@freebsd.org
Subject:   Desired behaviour of "ifconfig -alias"
Message-ID:  <45CCE270.7080704@insidesystems.net>

next in thread | raw e-mail | index | archive | help
I recently ran into a bug in the jail startup scripts that caused this
command to be executed:

    ifconfig bce0 -alias

It turns out that this command eliminated the primary IP for the device.

man ifconfig defines the behavior of -alias to be:

     -alias  Remove the network address specified.  This would be used
if you
             incorrectly specified an alias, or it was no longer needed.  If
             you have incorrectly set an NS address having the side
effect of
             specifying the host portion, removing all NS addresses will
allow
             you to respecify the host portion.


I can't help but wonder if it would be better behavior to throw an error
when no
argument is supplied.

The only discussion I found of this in a quick search of the archives
was a post in
2004 which noted that the fxp driver actually deletes all IP addresses,
but there was
no significant follow-up.

Should ifconfig throw an error if no address is supplied?

-Kevin Way



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45CCE270.7080704>