[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1379990645.19083.9.camel@cr0>
Date: Tue, 24 Sep 2013 10:44:05 +0800
From: Cong Wang <amwang@...hat.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [RESEND PATCH iproute2] vxlan: add ipv6 support
On Mon, 2013-09-23 at 13:20 -0700, Stephen Hemminger wrote:
> On Sat, 21 Sep 2013 10:35:24 +0800
> Cong Wang <amwang@...hat.com> wrote:
>
> > + if (!inet_pton(AF_INET, *argv, &gaddr)) {
> > + if (!inet_pton(AF_INET6, *argv, &gaddr6)) {
> > + fprintf(stderr, "Invalid address \"%s\"\n", *argv);
> > + return -1;
> > + } else if (!IN6_IS_ADDR_MULTICAST(&gaddr6))
> > + invarg("invald group address", *argv);
> > + } else if (!IN_MULTICAST(ntohl(gaddr)))
> > + invarg("invald group address", *argv);
>
> This is ugly, can't it be done more generically by checking for ':' in address.
> Or even use getaddrinfo.
>
> Hate to have lots of special code to handle both address types.
>
Alright, I will introduce a helper function for it.
Thanks!
--
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