summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport.c
diff options
context:
space:
mode:
authorFan Du <fan.du@intel.com>2015-01-14 13:10:35 +0800
committerDavid S. Miller <davem@davemloft.net>2015-01-14 16:32:06 -0500
commit3f4c1d87af2a0c8a599b95bfebbc6338de343aca (patch)
treeeb8a54a9c56cec232bbebf303c18f749965a1e59 /net/openvswitch/vport.c
parent2733135329e9bbc306be9f58af1b4be92b359d23 (diff)
downloadlinux-3f4c1d87af2a0c8a599b95bfebbc6338de343aca.tar.bz2
openvswitch: Introduce ovs_tunnel_route_lookup
Introduce ovs_tunnel_route_lookup to consolidate route lookup shared by vxlan, gre, and geneve ports. Signed-off-by: Fan Du <fan.du@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r--net/openvswitch/vport.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 464739aac0f3..ec2954ffc690 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -595,14 +595,7 @@ int ovs_tunnel_get_egress_info(struct ovs_tunnel_info *egress_tun_info,
* The process may need to be changed if the corresponding process
* in vports ops changed.
*/
- memset(&fl, 0, sizeof(fl));
- fl.daddr = tun_key->ipv4_dst;
- fl.saddr = tun_key->ipv4_src;
- fl.flowi4_tos = RT_TOS(tun_key->ipv4_tos);
- fl.flowi4_mark = skb_mark;
- fl.flowi4_proto = ipproto;
-
- rt = ip_route_output_key(net, &fl);
+ rt = ovs_tunnel_route_lookup(net, tun_key, skb_mark, &fl, ipproto);
if (IS_ERR(rt))
return PTR_ERR(rt);