projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AUTHORS: Add Valient Gough.
[openvswitch]
/
datapath
/
tunnel.c
diff --git
a/datapath/tunnel.c
b/datapath/tunnel.c
index a0d9fd959a86ad03375a0b25bbd34388b49ab15a..f1711f1f5411433078849b0f19f03cfc1a1cbf37 100644
(file)
--- a/
datapath/tunnel.c
+++ b/
datapath/tunnel.c
@@
-1369,12
+1369,6
@@
static int tnl_set_config(struct nlattr *options, const struct tnl_ops *tnl_ops,
if (a[ODP_TUNNEL_ATTR_TTL])
mutable->ttl = nla_get_u8(a[ODP_TUNNEL_ATTR_TTL]);
if (a[ODP_TUNNEL_ATTR_TTL])
mutable->ttl = nla_get_u8(a[ODP_TUNNEL_ATTR_TTL]);
- mutable->tunnel_hlen = tnl_ops->hdr_len(mutable);
- if (mutable->tunnel_hlen < 0)
- return mutable->tunnel_hlen;
-
- mutable->tunnel_hlen += sizeof(struct iphdr);
-
mutable->tunnel_type = tnl_ops->tunnel_type;
if (!a[ODP_TUNNEL_ATTR_IN_KEY]) {
mutable->tunnel_type |= TNL_T_KEY_MATCH;
mutable->tunnel_type = tnl_ops->tunnel_type;
if (!a[ODP_TUNNEL_ATTR_IN_KEY]) {
mutable->tunnel_type |= TNL_T_KEY_MATCH;
@@
-1389,6
+1383,12
@@
static int tnl_set_config(struct nlattr *options, const struct tnl_ops *tnl_ops,
else
mutable->out_key = nla_get_be64(a[ODP_TUNNEL_ATTR_OUT_KEY]);
else
mutable->out_key = nla_get_be64(a[ODP_TUNNEL_ATTR_OUT_KEY]);
+ mutable->tunnel_hlen = tnl_ops->hdr_len(mutable);
+ if (mutable->tunnel_hlen < 0)
+ return mutable->tunnel_hlen;
+
+ mutable->tunnel_hlen += sizeof(struct iphdr);
+
old_vport = tnl_find_port(mutable->saddr, mutable->daddr,
mutable->in_key, mutable->tunnel_type,
&old_mutable);
old_vport = tnl_find_port(mutable->saddr, mutable->daddr,
mutable->in_key, mutable->tunnel_type,
&old_mutable);