aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r--net/openvswitch/flow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index c8db44ab2ee7..0ea128eeeab2 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -698,8 +698,7 @@ int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
698{ 698{
699 /* Extract metadata from packet. */ 699 /* Extract metadata from packet. */
700 if (tun_info) { 700 if (tun_info) {
701 if (ip_tunnel_info_af(tun_info) != AF_INET) 701 key->tun_proto = ip_tunnel_info_af(tun_info);
702 return -EINVAL;
703 memcpy(&key->tun_key, &tun_info->key, sizeof(key->tun_key)); 702 memcpy(&key->tun_key, &tun_info->key, sizeof(key->tun_key));
704 703
705 if (tun_info->options_len) { 704 if (tun_info->options_len) {
@@ -714,6 +713,7 @@ int ovs_flow_key_extract(const struct ip_tunnel_info *tun_info,
714 key->tun_opts_len = 0; 713 key->tun_opts_len = 0;
715 } 714 }
716 } else { 715 } else {
716 key->tun_proto = 0;
717 key->tun_opts_len = 0; 717 key->tun_opts_len = 0;
718 memset(&key->tun_key, 0, sizeof(key->tun_key)); 718 memset(&key->tun_key, 0, sizeof(key->tun_key));
719 } 719 }