瀏覽代碼

IPVS: Conditional ip_vs_conntrack_enabled()

ip_vs_conntrack_enabled() becomes a noop when CONFIG_SYSCTL is undefined.

In preparation for not including sysctl_conntrack in
struct netns_ipvs when CONFIG_SYCTL is not defined.

Signed-off-by: Simon Horman <horms@verge.net.au>
Simon Horman 14 年之前
父節點
當前提交
a4e2f5a700
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      include/net/ip_vs.h

+ 4 - 0
include/net/ip_vs.h

@@ -1359,7 +1359,11 @@ static inline void ip_vs_notrack(struct sk_buff *skb)
  */
  */
 static inline int ip_vs_conntrack_enabled(struct netns_ipvs *ipvs)
 static inline int ip_vs_conntrack_enabled(struct netns_ipvs *ipvs)
 {
 {
+#ifdef CONFIG_SYSCTL
 	return ipvs->sysctl_conntrack;
 	return ipvs->sysctl_conntrack;
+#else
+	return 0;
+#endif
 }
 }
 
 
 extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp,
 extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp,