[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 12 Dec 2007 08:40:33 -0800
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: Andreas Henriksson <andreas@...al.se>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] iproute2: support dotted-quad netmask notation.
On Wed, 12 Dec 2007 12:55:13 +0100
Andreas Henriksson <andreas@...al.se> 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 <andreas@...al.se> 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 <shemminger@...ux-foundation.org>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists