diff options
author | Sumit Semwal <sumit.semwal@linaro.org> | 2017-08-15 14:42:42 +0530 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2017-08-15 14:42:42 +0530 |
commit | 27f659ddd0ab03ddf2a8248c6cd0d005a933ee01 (patch) | |
tree | 3748cc6b25dfcbf5ad3ee77018e49d71fa2052fa /net/openvswitch/conntrack.c | |
parent | f5ec4ffd9c9ddf29aaf339a8619a5cd145f62342 (diff) | |
parent | f7c8f04f49568e772560bbe388895daaf9b053f6 (diff) |
Merge remote-tracking branch 'stable-rc/linux-4.4.y' into 4.4.83-rc-hikey4.4-83-rc-hikey-20170815
Diffstat (limited to 'net/openvswitch/conntrack.c')
-rw-r--r-- | net/openvswitch/conntrack.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index ad58d2a6284e..6a2507f24b0f 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -577,8 +577,8 @@ static int parse_ct(const struct nlattr *attr, struct ovs_conntrack_info *info, nla_for_each_nested(a, attr, rem) { int type = nla_type(a); - int maxlen = ovs_ct_attr_lens[type].maxlen; - int minlen = ovs_ct_attr_lens[type].minlen; + int maxlen; + int minlen; if (type > OVS_CT_ATTR_MAX) { OVS_NLERR(log, @@ -586,6 +586,9 @@ static int parse_ct(const struct nlattr *attr, struct ovs_conntrack_info *info, type, OVS_CT_ATTR_MAX); return -EINVAL; } + + maxlen = ovs_ct_attr_lens[type].maxlen; + minlen = ovs_ct_attr_lens[type].minlen; if (nla_len(a) < minlen || nla_len(a) > maxlen) { OVS_NLERR(log, "Conntrack attr type has unexpected length (type=%d, length=%d, expected=%d)", |