Skip to content

Commit 3a1bbf1

Browse files
committed
IPVS: ip_vs_todrop() becomes a noop when CONFIG_SYSCTL is undefined
Signed-off-by: Simon Horman <horms@verge.net.au>
1 parent b27d777 commit 3a1bbf1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/net/ip_vs.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,7 @@ extern int ip_vs_icmp_xmit_v6
12531253
int offset);
12541254
#endif
12551255

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

12721276
/*
12731277
* ip_vs_fwd_tag returns the forwarding tag of the connection

0 commit comments

Comments
 (0)