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