From: Thomas Graf <tgraf@suug.ch>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <shemminger@vyatta.com>
Subject: Re: [RFC Patch net-next] vxlan: add ipv6 support
Date: Thu, 28 Feb 2013 10:33:11 +0000 [thread overview]
Message-ID: <20130228103311.GC7558@casper.infradead.org> (raw)
In-Reply-To: <1362031286-23295-1-git-send-email-amwang@redhat.com>
On 02/28/13 at 02:01pm, Cong Wang wrote:
> WARNING: This is just an RFC patch, it only compiles!!
>
> This patch adds IPv6 support to vxlan device, as the new version
> RFC already mentioned it:
>
> http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-03
>
> I am not sure if the following trick will work:
>
> + if (nla_len(nla) == sizeof(__be32)) {
> + ip->ip4 = nla_get_be32(nla);
> + ip->proto = htons(ETH_P_IP);
> + }
> +#if IS_ENABLED(CONFIG_IPV6)
> + else if (nla_len(nla) == sizeof(struct in6_addr)) {
> + nla_memcpy(&ip->ip6, nla, sizeof(struct in6_addr));
> + ip->proto = htons(ETH_P_IPV6);
> + }
> +#endif
>
> otherwise we have to introduce some new netlink attributes for
> IPv6 addresses? Any comments?
How about setting ndm_family to AF_INET6 and parse NDA_DST based on
that?
Assuming that nla_len(NDA_DST) > 4 == ip6 is a bit weak as like with
any Netlink attribute we only ever enforce a minimum length and never
a maximum or exact length.
next prev parent reply other threads:[~2013-02-28 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 6:01 [RFC Patch net-next] vxlan: add ipv6 support Cong Wang
2013-02-28 10:33 ` Thomas Graf [this message]
2013-02-28 21:07 ` Vlad Yasevich
2013-03-01 3:31 ` Cong Wang
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=20130228103311.GC7558@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).