Re: Subtleties of the netmask (inet_ifa_match)

From: Allen Lau (
Date: Fri Jul 27 2001 - 14:03:29 EST


>> The inet_ifa_match function seems to be wrong with netmask.
>> The netmask matches everything!
>Of course. Zero mask matches everything.

I agree that netmask in a route entry (dest mask
matches everything.
However, it is intuitively different with an interface address.
Can an IP address be on every subnet (i.e. is prefix 0 on every

I believe it is not right for inet_ifa_match to answer "yes" in the context of :
     is on the same subnet as interface address prefix 0?

>> Will there be any routing problems if we use the 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


Allen Lau

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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