History

Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next

Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter/IPVS updates for you net-next tree: 1) Missing NFTA_RULE_POSITION_ID netlink attribute validation, from Phil Sutter. 2) Restrict matching on tunnel metadata to rx/tx path, from wenxu. 3) Avoid indirect calls for IPV6=y, from Florian Westphal. 4) Add two indirections to prepare merger of IPV4 and IPV6 nat modules, from Florian Westphal. 5) Broken indentation in ctnetlink, from Colin Ian King. 6) Patches to use struct_size() from netfilter and IPVS, from Gustavo A. R. Silva. 7) Display kernel splat only once in case of racing to confirm conntrack from bridge plus nfqueue setups, from Chieh-Min Wang. 8) Skip checksum validation for layer 4 protocols that don't need it, patch from Alin Nastac. 9) Sparse warning due to symbol that should be static in CLUSTERIP, from Wei Yongjun. 10) Add new toggle to disable SDP payload translation when media endpoint is reachable though the same interface as the signalling peer, from Alin Nastac. ====================

David S. Miller committed 7 years ago

Commit 8bbed402 parents e511f17 a3419ce22 files · +244 −63Browse files

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

Unified · Split

include/linux/netfilter_ipv6.h+52−8
@@ -25,23 +25,24 @@ struct nf_queue_entry; · 24 unmodified lines
2525 * if IPv6 is a module.
2626 */
2727 struct nf_ipv6_ops {
28+#if IS_MODULE(CONFIG_IPV6)
2829 int (*chk_addr)(struct net *net, const struct in6_addr *addr,
2930 const struct net_device *dev, int strict);
31+ int (*route_me_harder)(struct net *net, struct sk_buff *skb);
32+ int (*dev_get_saddr)(struct net *net, const struct net_device *dev,
33+ const struct in6_addr *daddr, unsigned int srcprefs,
34+ struct in6_addr *saddr);
35+ int (*route)(struct net *net, struct dst_entry **dst, struct flowi *fl,
36+ bool strict);
37+#endif
3038 void (*route_input)(struct sk_buff *skb);
3139 int (*fragment)(struct net *net, struct sock *sk, struct sk_buff *skb,
3240 int (*output)(struct net *, struct sock *, struct sk_buff *));
33− int (*route)(struct net *net, struct dst_entry **dst, struct flowi *fl,
34− bool strict);
3541 int (*reroute)(struct sk_buff *skb, const struct nf_queue_entry *entry);
3642 };
3743
3844 #ifdef CONFIG_NETFILTER
39−int ip6_route_me_harder(struct net *net, struct sk_buff *skb);
40−__sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
41− unsigned int dataoff, u_int8_t protocol);
42−
43−int ipv6_netfilter_init(void);
44−void ipv6_netfilter_fini(void);
45+#include <net/addrconf.h>
4546
4647 extern const struct nf_ipv6_ops __rcu *nf_ipv6_ops;
4748 static inline const struct nf_ipv6_ops *nf_get_ipv6_ops(void)
@@ -49,6 +50,49 @@ static inline const struct nf_ipv6_ops *nf_get_ipv6_ops(void) · 1 unmodified line
4950 return rcu_dereference(nf_ipv6_ops);
5051 }
5152
53+static inline int nf_ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
54+ const struct net_device *dev, int strict)
55+{
56+#if IS_MODULE(CONFIG_IPV6)
57+ const struct nf_ipv6_ops *v6_ops = nf_get_ipv6_ops();
58+
59+ if (!v6_ops)
60+ return 1;
61+
62+ return v6_ops->chk_addr(net, addr, dev, strict);
63+#else
64+ return ipv6_chk_addr(net, addr, dev, strict);
65+#endif
66+}
67+
68+int __nf_ip6_route(struct net *net, struct dst_entry **dst,
69+ struct flowi *fl, bool strict);
70+
71+static inline int nf_ip6_route(struct net *net, struct dst_entry **dst,
72+ struct flowi *fl, bool strict)
73+{
74+#if IS_MODULE(CONFIG_IPV6)
75+ const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops();
76+
77+ if (v6ops)
78+ return v6ops->route(net, dst, fl, strict);
79+
80+ return -EHOSTUNREACH;
81+#endif
82+#if IS_BUILTIN(CONFIG_IPV6)
83+ return __nf_ip6_route(net, dst, fl, strict);
84+#else
85+ return -EHOSTUNREACH;
86+#endif
87+}
88+
89+int ip6_route_me_harder(struct net *net, struct sk_buff *skb);
90+__sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
91+ unsigned int dataoff, u_int8_t protocol);
92+
93+int ipv6_netfilter_init(void);
94+void ipv6_netfilter_fini(void);
95+
5296 #else /* CONFIG_NETFILTER */
5397 static inline int ipv6_netfilter_init(void) { return 0; }
5498 static inline void ipv6_netfilter_fini(void) { return; }

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