History

netfilter: nat: remove module dependency on ipv6 core

nf_nat_ipv6 calls two ipv6 core functions, so add those to v6ops to avoid the module dependency. This is a prerequisite for merging ipv4 and ipv6 nat implementations. Add wrappers to avoid the indirection if ipv6 is builtin.

Florian Westphal committed 7 years ago

Commit 96058721 parent a46c52d4 files · +45 −3Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/netfilter_ipv6.h+6−0
@@ -33,6 +33,12 @@ struct nf_ipv6_ops { · 32 unmodified lines
33 int (*route)(struct net *net, struct dst_entry **dst, struct flowi *fl,33 int (*route)(struct net *net, struct dst_entry **dst, struct flowi *fl,
34 bool strict);34 bool strict);
35 int (*reroute)(struct sk_buff *skb, const struct nf_queue_entry *entry);35 int (*reroute)(struct sk_buff *skb, const struct nf_queue_entry *entry);
36#if IS_MODULE(CONFIG_IPV6)
37 int (*route_me_harder)(struct net *net, struct sk_buff *skb);
38 int (*dev_get_saddr)(struct net *net, const struct net_device *dev,
39 const struct in6_addr *daddr, unsigned int srcprefs,
40 struct in6_addr *saddr);
41#endif
36};42};
37 43
38#ifdef CONFIG_NETFILTER44#ifdef CONFIG_NETFILTER

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t