diff options
| author | Florian Westphal <[email protected]> | 2019-01-27 18:18:57 +0000 |
|---|---|---|
| committer | Pablo Neira Ayuso <[email protected]> | 2019-01-28 10:32:58 +0000 |
| commit | 83f529281d7aa42b10c2c5cb64fcbd2c7cab4409 (patch) | |
| tree | e3e89eb0165cddb1535965a7110cfbce859efc0b /net/netfilter/utils.c | |
| parent | netfilter: conntrack: fix error path in nf_conntrack_pernet_init() (diff) | |
| download | kernel-83f529281d7aa42b10c2c5cb64fcbd2c7cab4409.tar.gz kernel-83f529281d7aa42b10c2c5cb64fcbd2c7cab4409.zip | |
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 <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'net/netfilter/utils.c')
| -rw-r--r-- | net/netfilter/utils.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/netfilter/utils.c b/net/netfilter/utils.c index e8da9a9bba73..55af9f247993 100644 --- a/net/netfilter/utils.c +++ b/net/netfilter/utils.c @@ -180,6 +180,25 @@ int nf_route(struct net *net, struct dst_entry **dst, struct flowi *fl, } 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) { const struct nf_ipv6_ops *v6ops; |
