IPVS: Conditional ip_vs_conntrack_enabled()
authorSimon Horman <horms@verge.net.au>
Fri, 4 Feb 2011 09:33:02 +0000 (18:33 +0900)
committerSimon Horman <horms@verge.net.au>
Tue, 15 Mar 2011 00:37:00 +0000 (09:37 +0900)
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>
include/net/ip_vs.h

index 77ebece..299aeb5 100644 (file)
@@ -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)
 {
+#ifdef CONFIG_SYSCTL
        return ipvs->sysctl_conntrack;
+#else
+       return 0;
+#endif
 }
 
 extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp,