Tom Lane <tgl@sss.pgh.pa.us> writes:
> steve=# select '224.0.0.0'::cidr;
> cidr
> -------------
> 224.0.0.0/4
>
> which should be /32 according to what the docs say:
224-239 are multicast addresses. Making it /4 makes the entire multicast
address space one network block which is about as reasonable an answer as
anything else.
> if (bits >= 8 && bits < ((dst - odst) * 8))
> ^^^^^^^^^
> bits = (dst - odst) * 8;
> }
>
> I think the test for "bits >= 8" should be removed. Does anyone know
> why it's there?
I guess Vixie figured network blocks subdividing multicast address space
weren't a sensible concept? It's a bit of a strange constraint to hard code
into the C code though.
Incidentally, how can that code possibly work? It treats odst as a pointer in
some places but then calculates bits using arithmetic on it directly without
dereferencing?
--
greg