From: Jiri Benc <jbenc@redhat.com>
To: Pravin Shelar <pshelar@nicira.com>
Cc: netdev <netdev@vger.kernel.org>, Thomas Graf <tgraf@suug.ch>
Subject: Re: [PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info
Date: Fri, 28 Aug 2015 20:16:15 +0200 [thread overview]
Message-ID: <20150828201615.0d148fbb@griffin> (raw)
In-Reply-To: <CALnjE+og0n18p6_BwHfUudHDLPA5_WtT2TmqCM+FhGFtzj+FKg@mail.gmail.com>
On Fri, 28 Aug 2015 10:32:15 -0700, Pravin Shelar wrote:
> > --- a/drivers/net/geneve.c
> > +++ b/drivers/net/geneve.c
> > @@ -644,6 +644,9 @@ static netdev_tx_t geneve_xmit(struct sk_buff *skb, struct net_device *dev)
> > u8 *opts = NULL;
> > u8 vni[3];
> >
> > + if (ip_tunnel_info_af(info) != AF_INET)
> > + goto err;
> > +
> geneve_get_rt() already interpreted the info as ipv4 tunnel info.
Hmm, okay. I'll move the check. The geneve module changed more than
I thought.
Thanks for noticing this.
> We can avoid such bugs by introducing separate API to retrieve ipv4
> and ipv6 tunnel info. Something like
> skb_tunnel_info_v4()/skb_tunnel_info_v6() for ipv4 and ipv6.
I don't think we want that. Ideally, the xmit function should work with
both and use the protocol information to choose the correct output
path. I intend to try this with the metadata based vxlan which would
use the correct socket (IPv4 or IPv6) appropriately. That way, we won't
need a separate vxlan interface for IPv4 and IPv6 traffic. Will be much
more user friendly and most likely easier to use from ovs, too.
Jiri
--
Jiri Benc
next prev parent reply other threads:[~2015-08-28 18:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 14:27 [PATCH net-next 0/4] tunnels: fix incorrect IPv4/v6 headers interpretation Jiri Benc
2015-08-28 14:27 ` [PATCH net-next 1/4] ip_tunnels: convert the mode field of ip_tunnel_info to flags Jiri Benc
2015-08-28 16:32 ` Alexei Starovoitov
2015-08-28 17:29 ` Pravin Shelar
2015-08-28 18:08 ` Jiri Benc
2015-08-28 14:27 ` [PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info Jiri Benc
2015-08-28 16:33 ` Alexei Starovoitov
2015-08-28 17:32 ` Pravin Shelar
2015-08-28 18:16 ` Jiri Benc [this message]
2015-08-28 14:27 ` [PATCH net-next 3/4] fou: reject IPv6 config Jiri Benc
2015-08-28 14:27 ` [PATCH net-next 4/4] vxlan: do not receive IPv4 packets on IPv6 socket Jiri Benc
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=20150828201615.0d148fbb@griffin \
--to=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=tgraf@suug.ch \
/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).