]> git.openpandora.org Git - pandora-kernel.git/commitdiff
route: move lwtunnel state to dst_entry
authorJiri Benc <jbenc@redhat.com>
Thu, 20 Aug 2015 11:56:25 +0000 (13:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2015 22:42:36 +0000 (15:42 -0700)
Currently, the lwtunnel state resides in per-protocol data. This is
a problem if we encapsulate ipv6 traffic in an ipv4 tunnel (or vice versa).
The xmit function of the tunnel does not know whether the packet has been
routed to it by ipv4 or ipv6, yet it needs the lwtstate data. Moving the
lwtstate data to dst_entry makes such inter-protocol tunneling possible.

As a bonus, this brings a nice diffstat.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
drivers/net/vrf.c
drivers/net/vxlan.c
include/net/dst.h
include/net/dst_metadata.h
include/net/ip6_fib.h
include/net/lwtunnel.h
include/net/route.h
net/core/dst.c
net/core/filter.c
net/core/lwtunnel.c
net/ipv4/ip_gre.c
net/ipv4/route.c
net/ipv6/ila.c
net/ipv6/ip6_fib.c
net/ipv6/route.c
net/mpls/mpls_iptunnel.c
net/openvswitch/vport-netdev.c

index dbeffe789185d7bf115abc8372fea919948af938..b3d9c5546c795768a7982092b23063a36b7749d9 100644 (file)
@@ -295,7 +295,6 @@ static struct rtable *vrf_rtable_create(struct net_device *dev)
                rth->rt_uses_gateway = 0;
                INIT_LIST_HEAD(&rth->rt_uncached);
                rth->rt_uncached_list = NULL;
-               rth->rt_lwtstate = NULL;
        }
 
        return rth;
index ebeb3def06c541d5af5e95d90d5cf2211ea2e1de..93613ffd8d7efd2ff9becd297b628dd736d4d132 100644 (file)
@@ -1909,7 +1909,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
        u32 flags = vxlan->flags;
 
        /* FIXME: Support IPv6 */
-       info = skb_tunnel_info(skb, AF_INET);
+       info = skb_tunnel_info(skb);
 
        if (rdst) {
                dst_port = rdst->remote_port ? rdst->remote_port : vxlan->cfg.dst_port;
@@ -2105,7 +2105,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
        struct vxlan_fdb *f;
 
        /* FIXME: Support IPv6 */
-       info = skb_tunnel_info(skb, AF_INET);
+       info = skb_tunnel_info(skb);
 
        skb_reset_mac_header(skb);
        eth = eth_hdr(skb);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/dst.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv6/ila.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge