+ tun_id = nla_get_be64(nla);
+
+ if (tun_key->ipv4_dst) {
+ if (!(tun_key->tun_flags & OVS_TNL_F_KEY))
+ return -EINVAL;
+ if (tun_key->tun_id != tun_id)
+ return -EINVAL;
+ break;
+ }
+ tun_key->tun_id = tun_id;
+ tun_key->tun_flags |= OVS_TNL_F_KEY;
+
+ break;
+
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
+ if (tun_key->tun_flags & OVS_TNL_F_KEY) {
+ tun_id = tun_key->tun_id;
+
+ memcpy(tun_key, nla_data(nla), sizeof(*tun_key));
+ if (!(tun_key->tun_flags & OVS_TNL_F_KEY))
+ return -EINVAL;
+
+ if (tun_key->tun_id != tun_id)
+ return -EINVAL;
+ } else
+ memcpy(tun_key, nla_data(nla), sizeof(*tun_key));
+
+ if (!tun_key->ipv4_dst)
+ return -EINVAL;