>> 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.
I agree that 0.0.0.0 netmask in a route entry (dest 0.0.0.0 mask 0.0.0.0)
matches everything.
However, it is intuitively different with an interface address.
Can an IP address be on every subnet (i.e. is 10.1.1.1 prefix 0 on every
subnet)?
I believe it is not right for inet_ifa_match to answer "yes" in the context of :
is 9.9.9.9 on the same subnet as interface address 10.1.1.1 prefix 0?
>> 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
Allen Lau
-
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/