Re: howto disable auto route setup?

Steve Dodd (dirk@loth.demon.co.uk)
Tue, 2 Feb 1999 02:47:39 +0000


Hi,

On Tue, Feb 02, 1999 at 01:04:31AM +0000, David Woodhouse wrote:

[of auto iface routes]
> Not necessarily. It doesn't get point to point devices right. Having to add
> the second line in the attached snippet of script is a pain in the arse.
>
> /sbin/ifconfig ippp0 $MYIP pointopoint $ISPIP -arp -broadcast up

You should probably netmask 255.255.255.255 on ifconfig. That, or ifconfig
should default to that netmask automagically if you specify point to point.
Or the kernel should default to that netmask when you set up a point to
point interface / device.

One wrong solution would probably be something like the following:

--- vanilla/net/ipv4/fib_frontend.c Thu Jan 7 21:05:24 1999
+++ linux/net/ipv4/fib_frontend.c Tue Feb 2 02:41:53 1999
@@ -444,7 +444,8 @@
fib_magic(RTM_NEWROUTE, RTN_BROADCAST, ifa->ifa_broadcast, 32, prim);

if (!ZERONET(prefix) && !(ifa->ifa_flags&IFA_F_SECONDARY) &&
- (prefix != addr || ifa->ifa_prefixlen < 32)) {
+ (prefix != addr || ifa->ifa_prefixlen < 32) &&
+ !(dev->flags&IFF_POINTTOPOINT) ) {
fib_magic(RTM_NEWROUTE, dev->flags&IFF_LOOPBACK ? RTN_LOCAL :
RTN_UNICAST, prefix, ifa->ifa_prefixlen, prim);

(Utterly untested of course - I don't claim to have really understood any
of the stuff in net/ipv4/fib_*.c)

As I said, probably conceptually wrong (as well as the code probably being
wrong) -- but if it keeps people quiet?

S.

-- 
We are Linux. Resistance is an indication that you missed the point.

- 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.tux.org/lkml/