History

netfilter: nf_tables: merge route type into core

very little code, so it really doesn't make sense to have extra modules or even a kconfig knob for this. Merge them and make functionality available unconditionally. The merge makes inet family route support trivial, so add it as well here. Before: text data bss dec hex filename 835 832 0 1667 683 nft_chain_route_ipv4.ko 870 832 0 1702 6a6 nft_chain_route_ipv6.ko 111568 2556 529 114653 1bfdd nf_tables.ko After: text data bss dec hex filename 113133 2556 529 116218 1c5fa nf_tables.ko

Florian Westphal committed 7 years ago

Commit c1deb061 parent d16438512 files · +191 −214Browse files

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

Unified · Split

include/linux/netfilter_ipv6.h+15−0
@@ -87,6 +87,21 @@ static inline int nf_ip6_route(struct net *net, struct dst_entry **dst, · 86 unmodified lines
8787 }
8888
8989 int ip6_route_me_harder(struct net *net, struct sk_buff *skb);
90+
91+static inline int nf_ip6_route_me_harder(struct net *net, struct sk_buff *skb)
92+{
93+#if IS_MODULE(CONFIG_IPV6)
94+ const struct nf_ipv6_ops *v6_ops = nf_get_ipv6_ops();
95+
96+ if (!v6_ops)
97+ return -EHOSTUNREACH;
98+
99+ return v6_ops->route_me_harder(net, skb);
100+#else
101+ return ip6_route_me_harder(net, skb);
102+#endif
103+}
104+
90105 __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
91106 unsigned int dataoff, u_int8_t protocol);
92107

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