Skip to content

Commit

Permalink
IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Simon Horman committed Mar 15, 2011
1 parent b27d777 commit 3a1bbf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,7 @@ extern int ip_vs_icmp_xmit_v6
int offset);
#endif

#ifdef CONFIG_SYSCTL
/*
* This is a simple mechanism to ignore packets when
* we are loaded. Just set ip_vs_drop_rate to 'n' and
Expand All @@ -1268,6 +1269,9 @@ static inline int ip_vs_todrop(struct netns_ipvs *ipvs)
ipvs->drop_counter = ipvs->drop_rate;
return 1;
}
#else
static inline int ip_vs_todrop(struct netns_ipvs *ipvs) { return 0; }
#endif

/*
* ip_vs_fwd_tag returns the forwarding tag of the connection
Expand Down

0 comments on commit 3a1bbf1

Please sign in to comment.