netfilter: ipv4: remove useless export_symbol
Only one caller; place it where needed and get rid of the EXPORT_SYMBOL. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
ac088a88b5
commit
83f529281d
@@ -25,7 +25,6 @@ __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
|
|||||||
unsigned int dataoff, u_int8_t protocol);
|
unsigned int dataoff, u_int8_t protocol);
|
||||||
int nf_ip_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
|
int nf_ip_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
|
||||||
bool strict);
|
bool strict);
|
||||||
int nf_ip_reroute(struct sk_buff *skb, const struct nf_queue_entry *entry);
|
|
||||||
#else
|
#else
|
||||||
static inline __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
|
static inline __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
|
||||||
unsigned int dataoff, u_int8_t protocol)
|
unsigned int dataoff, u_int8_t protocol)
|
||||||
@@ -37,11 +36,6 @@ static inline int nf_ip_route(struct net *net, struct dst_entry **dst,
|
|||||||
{
|
{
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
static inline int nf_ip_reroute(struct sk_buff *skb,
|
|
||||||
const struct nf_queue_entry *entry)
|
|
||||||
{
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_INET */
|
#endif /* CONFIG_INET */
|
||||||
|
|
||||||
#endif /*__LINUX_IP_NETFILTER_H*/
|
#endif /*__LINUX_IP_NETFILTER_H*/
|
||||||
|
@@ -80,24 +80,6 @@ int ip_route_me_harder(struct net *net, struct sk_buff *skb, unsigned int addr_t
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ip_route_me_harder);
|
EXPORT_SYMBOL(ip_route_me_harder);
|
||||||
|
|
||||||
int nf_ip_reroute(struct sk_buff *skb, const struct nf_queue_entry *entry)
|
|
||||||
{
|
|
||||||
const struct ip_rt_info *rt_info = nf_queue_entry_reroute(entry);
|
|
||||||
|
|
||||||
if (entry->state.hook == NF_INET_LOCAL_OUT) {
|
|
||||||
const struct iphdr *iph = ip_hdr(skb);
|
|
||||||
|
|
||||||
if (!(iph->tos == rt_info->tos &&
|
|
||||||
skb->mark == rt_info->mark &&
|
|
||||||
iph->daddr == rt_info->daddr &&
|
|
||||||
iph->saddr == rt_info->saddr))
|
|
||||||
return ip_route_me_harder(entry->state.net, skb,
|
|
||||||
RTN_UNSPEC);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(nf_ip_reroute);
|
|
||||||
|
|
||||||
int nf_ip_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
|
int nf_ip_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
|
||||||
bool strict __always_unused)
|
bool strict __always_unused)
|
||||||
{
|
{
|
||||||
|
@@ -180,6 +180,25 @@ int nf_route(struct net *net, struct dst_entry **dst, struct flowi *fl,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(nf_route);
|
EXPORT_SYMBOL_GPL(nf_route);
|
||||||
|
|
||||||
|
static int nf_ip_reroute(struct sk_buff *skb, const struct nf_queue_entry *entry)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_INET
|
||||||
|
const struct ip_rt_info *rt_info = nf_queue_entry_reroute(entry);
|
||||||
|
|
||||||
|
if (entry->state.hook == NF_INET_LOCAL_OUT) {
|
||||||
|
const struct iphdr *iph = ip_hdr(skb);
|
||||||
|
|
||||||
|
if (!(iph->tos == rt_info->tos &&
|
||||||
|
skb->mark == rt_info->mark &&
|
||||||
|
iph->daddr == rt_info->daddr &&
|
||||||
|
iph->saddr == rt_info->saddr))
|
||||||
|
return ip_route_me_harder(entry->state.net, skb,
|
||||||
|
RTN_UNSPEC);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int nf_reroute(struct sk_buff *skb, struct nf_queue_entry *entry)
|
int nf_reroute(struct sk_buff *skb, struct nf_queue_entry *entry)
|
||||||
{
|
{
|
||||||
const struct nf_ipv6_ops *v6ops;
|
const struct nf_ipv6_ops *v6ops;
|
||||||
|
Reference in New Issue
Block a user