Re: 2.1 can't delete routes?

Chris Wedgwood (chris@cybernet.co.nz)
Mon, 13 Jul 1998 12:42:58 +1200


On Mon, Jul 13, 1998 at 12:22:04AM +0200, Thomas Quinot wrote:

> Why should it not? The kernel does (when you ifconfig up an interface,
> the netmask defaults this way for the automatically-created
> interface route).

Good point.

Here, I would argue that ifconfig should fail if no netmask is specified,
because the interface/connect route will then be incorrect.

I think almost all common distributions init the network along the lines of:

ifconfig eth3 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK} dev eth3
[ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1

So having a more rigid ifconfig and route will only break scripts people
have hacked themselves and are therefor presumably cluefull enough to fix
them.

> OBTW: is there a means of disabling the automatic creation
> of an interface route?

I don't think so. I'm not prevent this is a good idea.

I used to dislike the automatic generation of the route, but after some
though think it is the right thing to do.

Something else quite nice, ifconfig eth0 <same-ip> netmask <different-mask>
also correctly updates the route.

-Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html