Re: Subtleties of the 0.0.0.0 netmask (inet_ifa_match)

From: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
Date: Thu Jul 26 2001 - 19:32:00 EST


Hello!

> o Does addresses with 0.0.0.0 netmask have scope RT_SCOPE_NOWHERE?

Why?

> o and does it imply that routing would never route to them?

Even if you set this, it does not imply anything, but that address
will not be used on any packet while automaitc source address selection.

> o Are there subtle differences between 0.0.0.0 and 255.255.255.255 netmasks?

Subtle? :-) They are on exactly opposite poles.

> The inet_ifa_match function seems to be wrong with 0.0.0.0 netmask.
...
> The 0.0.0.0 netmask matches everything!

Of course. Zero mask matches everything.

> Will there be any routing problems if we use the 0.0.0.0 netmask?

No problems provided you wanted this.
F.e. default route is route with netmask zero, it matches all,
so that all the addresses are routed there.
It is exactly which happens in your setup, but all the addresses
fall to loopback.

Looking at your original purpose, you wanted mask 255.255.255.255.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:32 EST