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.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -33,6 +33,12 @@ struct nf_ipv6_ops { · 32 unmodified lines | ||
| 33 | 33 | int (*route)(struct net *net, struct dst_entry **dst, struct flowi *fl, |
| 34 | 34 | bool strict); |
| 35 | 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 | 44 | #ifdef CONFIG_NETFILTER |