aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-12 12:20:43 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-12 12:20:43 +0800
commita8a1fcae2dcc97748b7cafa7cb2745de1f35a8a6 (patch)
tree137462c079bb1ea3d1ea11ea3b3fd0011531cf06 /include/net
parent0903d615591c05931fd0cbbc87d62f562f79a61d (diff)
parente37ddf27108a992e191b27df9bd532cb9157dc89 (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rt
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 0816c872b689..a6cc576fd467 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1588,6 +1588,23 @@ static inline void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp)
}
#endif /* CONFIG_IP_VS_NFCT */
+/* Really using conntrack? */
+static inline bool ip_vs_conn_uses_conntrack(struct ip_vs_conn *cp,
+ struct sk_buff *skb)
+{
+#ifdef CONFIG_IP_VS_NFCT
+ enum ip_conntrack_info ctinfo;
+ struct nf_conn *ct;
+
+ if (!(cp->flags & IP_VS_CONN_F_NFCT))
+ return false;
+ ct = nf_ct_get(skb, &ctinfo);
+ if (ct && !nf_ct_is_untracked(ct))
+ return true;
+#endif
+ return false;
+}
+
static inline int
ip_vs_dest_conn_overhead(struct ip_vs_dest *dest)
{