summaryrefslogtreecommitdiffstats
path: root/net/netfilter/utils.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2024-02-14 14:41:02 +0100
committerFlorian Westphal <fw@strlen.de>2024-02-21 12:03:22 +0100
commit3f801968889459ecae1eab524b039676e6eaa319 (patch)
tree933152f793073a1b6c6e39da2154a0994f81bb83 /net/netfilter/utils.c
parent5b651783d80b97167ecd27dc6a4408c694873902 (diff)
downloadlinux-3f801968889459ecae1eab524b039676e6eaa319.tar.gz
linux-3f801968889459ecae1eab524b039676e6eaa319.tar.bz2
linux-3f801968889459ecae1eab524b039676e6eaa319.zip
netfilter: move nf_reinject into nfnetlink_queue modules
No need to keep this in the core, move it to the nfnetlink_queue module. nf_reroute is moved too, there were no other callers. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net/netfilter/utils.c')
-rw-r--r--net/netfilter/utils.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/net/netfilter/utils.c b/net/netfilter/utils.c
index acef4155f0da..008419db815a 100644
--- a/net/netfilter/utils.c
+++ b/net/netfilter/utils.c
@@ -179,43 +179,6 @@ 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, entry->state.sk,
- skb, RTN_UNSPEC);
- }
-#endif
- return 0;
-}
-
-int nf_reroute(struct sk_buff *skb, struct nf_queue_entry *entry)
-{
- const struct nf_ipv6_ops *v6ops;
- int ret = 0;
-
- switch (entry->state.pf) {
- case AF_INET:
- ret = nf_ip_reroute(skb, entry);
- break;
- case AF_INET6:
- v6ops = rcu_dereference(nf_ipv6_ops);
- if (v6ops)
- ret = v6ops->reroute(skb, entry);
- break;
- }
- return ret;
-}
-
/* Only get and check the lengths, not do any hop-by-hop stuff. */
int nf_ip6_check_hbh_len(struct sk_buff *skb, u32 *plen)
{