[PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info

2015-08-28 Thread Jiri Benc
There's currently nothing preventing directing packets with IPv6 encapsulation data to IPv4 tunnels (and vice versa). If this happens, IPv6 addresses are incorrectly interpreted as IPv4 ones. Track whether the given ip_tunnel_key contains IPv4 or IPv6 data. Store this in ip_tunnel_info. Reject

Re: [PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info

2015-08-28 Thread Alexei Starovoitov
On Fri, Aug 28, 2015 at 04:27:26PM +0200, Jiri Benc wrote: There's currently nothing preventing directing packets with IPv6 encapsulation data to IPv4 tunnels (and vice versa). If this happens, IPv6 addresses are incorrectly interpreted as IPv4 ones. Track whether the given ip_tunnel_key

Re: [PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info

2015-08-28 Thread Pravin Shelar
On Fri, Aug 28, 2015 at 7:27 AM, Jiri Benc jb...@redhat.com wrote: There's currently nothing preventing directing packets with IPv6 encapsulation data to IPv4 tunnels (and vice versa). If this happens, IPv6 addresses are incorrectly interpreted as IPv4 ones. Track whether the given

Re: [PATCH net-next 2/4] ip_tunnels: record IP version in tunnel info

2015-08-28 Thread Jiri Benc
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]; +