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. ====================
Showing the changes to include/linux (1 of 22 files). Show all
Unified · Split
| @@ -25,23 +25,24 @@ struct nf_queue_entry; · 24 unmodified lines | |||
| 25 | * if IPv6 is a module. | 25 | * if IPv6 is a module. |
| 26 | */ | 26 | */ |
| 27 | struct nf_ipv6_ops { | 27 | struct nf_ipv6_ops { |
| 28 | #if IS_MODULE(CONFIG_IPV6) | ||
| 28 | int (*chk_addr)(struct net *net, const struct in6_addr *addr, | 29 | int (*chk_addr)(struct net *net, const struct in6_addr *addr, |
| 29 | const struct net_device *dev, int strict); | 30 | 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 | ||
| 30 | void (*route_input)(struct sk_buff *skb); | 38 | void (*route_input)(struct sk_buff *skb); |
| 31 | int (*fragment)(struct net *net, struct sock *sk, struct sk_buff *skb, | 39 | int (*fragment)(struct net *net, struct sock *sk, struct sk_buff *skb, |
| 32 | int (*output)(struct net *, struct sock *, struct sk_buff *)); | 40 | 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); | ||
| 35 | int (*reroute)(struct sk_buff *skb, const struct nf_queue_entry *entry); | 41 | int (*reroute)(struct sk_buff *skb, const struct nf_queue_entry *entry); |
| 36 | }; | 42 | }; |
| 37 | 43 | ||
| 38 | #ifdef CONFIG_NETFILTER | 44 | #ifdef CONFIG_NETFILTER |
| 39 | int ip6_route_me_harder(struct net *net, struct sk_buff *skb); | 45 | #include <net/addrconf.h> |
| 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 | 46 | ||
| 46 | extern const struct nf_ipv6_ops __rcu *nf_ipv6_ops; | 47 | extern const struct nf_ipv6_ops __rcu *nf_ipv6_ops; |
| 47 | static inline const struct nf_ipv6_ops *nf_get_ipv6_ops(void) | 48 | 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 | |||
| 49 | return rcu_dereference(nf_ipv6_ops); | 50 | return rcu_dereference(nf_ipv6_ops); |
| 50 | } | 51 | } |
| 51 | 52 | ||
| 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 | |||
| 52 | #else /* CONFIG_NETFILTER */ | 96 | #else /* CONFIG_NETFILTER */ |
| 53 | static inline int ipv6_netfilter_init(void) { return 0; } | 97 | static inline int ipv6_netfilter_init(void) { return 0; } |
| 54 | static inline void ipv6_netfilter_fini(void) { return; } | 98 | static inline void ipv6_netfilter_fini(void) { return; } |