From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Andreas Henriksson <andreas@fatal.se>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] iproute2: support dotted-quad netmask notation.
Date: Wed, 12 Dec 2007 08:40:33 -0800 [thread overview]
Message-ID: <20071212084033.0efb24e7@freepuppy.rosehill> (raw)
In-Reply-To: <20071212115513.GA3394@scream.fatal.se>
On Wed, 12 Dec 2007 12:55:13 +0100
Andreas Henriksson <andreas@fatal.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@fatal.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@linux-foundation.org>
prev parent reply other threads:[~2007-12-12 16:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 13:58 [PATCH] iproute2: support dotted-quad netmask notation Andreas Henriksson
2007-12-06 19:53 ` Stephen Hemminger
2007-12-07 23:41 ` Andreas Henriksson
2007-12-09 17:10 ` Andreas Henriksson
2007-12-12 1:14 ` Stephen Hemminger
2007-12-12 11:55 ` Andreas Henriksson
2007-12-12 16:40 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071212084033.0efb24e7@freepuppy.rosehill \
--to=shemminger@linux-foundation.org \
--cc=andreas@fatal.se \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).