Skip to content

Commit

Permalink
ipvs: Don't protect ip_vs_addr_is_unicast with CONFIG_SYSCTL
Browse files Browse the repository at this point in the history
I arranged the code so that the compiler can remove the unecessary bits
in ip_vs_leave when CONFIG_SYSCTL is unset, and removed an explicit
CONFIG_SYSCTL.

Unfortunately when rebasing my work on top of that of Alex Gartrell I
missed the fact that the newly added function ip_vs_addr_is_unicast was
surrounded by CONFIG_SYSCTL.

So remove the now unnecessary CONFIG_SYSCTL guards around
ip_vs_addr_is_unicast.  It is causing build failures today when
CONFIG_SYSCTL is not selected and any self respecting compiler will
notice that sysctl_cache_bypass is always false without CONFIG_SYSCTL
and not include the logic from the function ip_vs_addr_is_unicast in
the compiled code.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Eric W. Biederman authored and Simon Horman committed Oct 1, 2015
1 parent 4bf1b54 commit b59f2e3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/netfilter/ipvs/ip_vs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb,
return cp;
}

#ifdef CONFIG_SYSCTL
static inline int ip_vs_addr_is_unicast(struct net *net, int af,
union nf_inet_addr *addr)
{
Expand All @@ -557,7 +556,6 @@ static inline int ip_vs_addr_is_unicast(struct net *net, int af,
#endif
return (inet_addr_type(net, addr->ip) == RTN_UNICAST);
}
#endif

/*
* Pass or drop the packet.
Expand Down

0 comments on commit b59f2e3

Please sign in to comment.