On Wed, 12 Dec 2007 12:55:13 +0100
Andreas Henriksson <[EMAIL PROTECTED]> wrote:

> On Tue, Dec 11, 2007 at 05:14:06PM -0800, Stephen Hemminger wrote:
> > On Sun, 09 Dec 2007 18:10:22 +0100
> > Andreas Henriksson <[EMAIL PROTECTED]> wrote:
> > > I think both previous patches where broken on big-endian platforms.
> > > Here's an updated patch again. I'm very sorry for the inconvenience!
> [...]
> > > +         *val=0;
> > > +         for (mask = ntohl(addr.data[0]); mask; mask <<= 1)
> > > +                 (*val)++;
> [...]
> > 
> > applied
> > 
> 
> Just to make sure.... It looks on git.kernel.org like you applied the wrong
> patch. (Maybe you just haven't pushed out the latest changes there yet.)
> Please double-check that you actually applied the latest version (which is
> the one in the mail you replied "applied" to, important part quoted above). 

Actually, I took your logic and moved it to a new function:

static unsigned cidr(const inet_prefix *addr)
{
        unsigned bits = 0;
        u_int32_t mask;

        for (mask = ntohl(addr->data[0]); mask; mask <<= 1)
                ++bits;

        return bits;
}
-- 
Stephen Hemminger <[EMAIL PROTECTED]>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to