Subject: Re: do you like or hate this enhancement
To: None <>
From: Daniel Carosone <>
List: current-users
Date: 08/19/1995 12:56:00
Perry Metzger writes:
> Daniel Carosone writes:
> > Some way to do this is needed, and the implementation offered by Perry
> > works well enough.  Aesthetically, I think I would prefer an
> > enhancement to the syntax of /etc/hostname.X to allow this. Something
> > like this would be nice, with various lines being optional:
> I often find that parsing these things gets gross in shell, and we
> don't get to use perl or such in /etc/rc and friends (perhaps a good
> thing!) Given this, I'd like to see how ugly an implementation of what you
> propose ends up looking. Perhaps you could provide one? 

Probably very ugly, which was one reason I went on to propose the more
generic version below.

> Remember that the thing also has to handle routing the interface
> aliases and the like, so it is going to have to recognise which
> lines contain addresses that need to be routed to localhost.

I'm not sure this is necessary. If it is, arguably it should not
be. The kernel is supposed to recognize dest addresses that match the
list of its own interfaces and cut them through the loopback code. If
this doesn't work for alias addresses, it should.

I will investigate whether these routes are necessary when I am not
logged into the box via the very interface I am reconfiguring :)

If the host route entries via localhost *are* necessary for some
reason, IMHO they should be added automatically like the route for the
attached network is during a `normal' ifconfig. (Is this done in the
kernel or by ifconfig?)

> Just to understand, I was trying to provide the functionality in a
> minimally intrusive way -- it seemed like a very simple way to add the
> functionality, and the functionality seems to be of common use these
> days.

Yes, and your solution does this well.  My proposal was simply "could
we be a bit more intrusive and come up with a more general solution?"

> > They could just be lines that get tacked onto the end of
> > "/sbin/ifconfig <if> " in a loop, in which case the syntax above
> > changes slightly.
> It can't be that simple, unfortunately, because of the need to do
> things like setting up routing.

As I said above, I'm not sure that routing is a problem (and if it is,
there's /etc/gateways to be loaded by routed, or a similar
generalisation of the /etc/mygate file that would list other static
routes to be configured).

I'm more than willing to accept that something else will make this
idea unworkable, but I can't see what that might be yet. "Calling all
Devil's Advocates...."