diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-08 20:39:29 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-08 20:39:29 -0500 |
| commit | ba00410b8131b23edfb0e09f8b6dd26c8eb621fb (patch) | |
| tree | c08504e4d2fa51ac91cef544f336d0169806c49f /include/net | |
| parent | 8ce74dd6057832618957fc2cbd38fa959c3a0a6c (diff) | |
| parent | aa583096d9767892983332e7c1a984bd17e3cd39 (diff) | |
Merge branch 'iov_iter' into for-next
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/9p/transport.h | 1 | ||||
| -rw-r--r-- | include/net/ipv6.h | 2 | ||||
| -rw-r--r-- | include/net/netfilter/ipv4/nf_reject.h | 10 | ||||
| -rw-r--r-- | include/net/netfilter/ipv6/nf_reject.h | 10 | ||||
| -rw-r--r-- | include/net/netfilter/nf_tables.h | 5 | ||||
| -rw-r--r-- | include/net/netfilter/nft_masq.h | 3 | ||||
| -rw-r--r-- | include/net/udp_tunnel.h | 9 | ||||
| -rw-r--r-- | include/net/vxlan.h | 18 |
8 files changed, 55 insertions, 3 deletions
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index d9fa68f26c41..2a25dec30211 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
| @@ -34,7 +34,6 @@ | |||
| 34 | * @list: used to maintain a list of currently available transports | 34 | * @list: used to maintain a list of currently available transports |
| 35 | * @name: the human-readable name of the transport | 35 | * @name: the human-readable name of the transport |
| 36 | * @maxsize: transport provided maximum packet size | 36 | * @maxsize: transport provided maximum packet size |
| 37 | * @pref: Preferences of this transport | ||
| 38 | * @def: set if this transport should be considered the default | 37 | * @def: set if this transport should be considered the default |
| 39 | * @create: member function to create a new connection on this transport | 38 | * @create: member function to create a new connection on this transport |
| 40 | * @close: member function to discard a connection on this transport | 39 | * @close: member function to discard a connection on this transport |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 97f472012438..4292929392b0 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -671,6 +671,8 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add | |||
| 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); | 671 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); |
| 672 | } | 672 | } |
| 673 | 673 | ||
| 674 | void ipv6_proxy_select_ident(struct sk_buff *skb); | ||
| 675 | |||
| 674 | int ip6_dst_hoplimit(struct dst_entry *dst); | 676 | int ip6_dst_hoplimit(struct dst_entry *dst); |
| 675 | 677 | ||
| 676 | static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, | 678 | static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6, |
diff --git a/include/net/netfilter/ipv4/nf_reject.h b/include/net/netfilter/ipv4/nf_reject.h index e8427193c777..03e928a55229 100644 --- a/include/net/netfilter/ipv4/nf_reject.h +++ b/include/net/netfilter/ipv4/nf_reject.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _IPV4_NF_REJECT_H | 1 | #ifndef _IPV4_NF_REJECT_H |
| 2 | #define _IPV4_NF_REJECT_H | 2 | #define _IPV4_NF_REJECT_H |
| 3 | 3 | ||
| 4 | #include <linux/skbuff.h> | ||
| 5 | #include <net/ip.h> | ||
| 4 | #include <net/icmp.h> | 6 | #include <net/icmp.h> |
| 5 | 7 | ||
| 6 | static inline void nf_send_unreach(struct sk_buff *skb_in, int code) | 8 | static inline void nf_send_unreach(struct sk_buff *skb_in, int code) |
| @@ -10,4 +12,12 @@ static inline void nf_send_unreach(struct sk_buff *skb_in, int code) | |||
| 10 | 12 | ||
| 11 | void nf_send_reset(struct sk_buff *oldskb, int hook); | 13 | void nf_send_reset(struct sk_buff *oldskb, int hook); |
| 12 | 14 | ||
| 15 | const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb, | ||
| 16 | struct tcphdr *_oth, int hook); | ||
| 17 | struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb, | ||
| 18 | const struct sk_buff *oldskb, | ||
| 19 | __be16 protocol, int ttl); | ||
| 20 | void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb, | ||
| 21 | const struct tcphdr *oth); | ||
| 22 | |||
| 13 | #endif /* _IPV4_NF_REJECT_H */ | 23 | #endif /* _IPV4_NF_REJECT_H */ |
diff --git a/include/net/netfilter/ipv6/nf_reject.h b/include/net/netfilter/ipv6/nf_reject.h index 48e18810a9be..23216d48abf9 100644 --- a/include/net/netfilter/ipv6/nf_reject.h +++ b/include/net/netfilter/ipv6/nf_reject.h | |||
| @@ -15,4 +15,14 @@ nf_send_unreach6(struct net *net, struct sk_buff *skb_in, unsigned char code, | |||
| 15 | 15 | ||
| 16 | void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook); | 16 | void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook); |
| 17 | 17 | ||
| 18 | const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb, | ||
| 19 | struct tcphdr *otcph, | ||
| 20 | unsigned int *otcplen, int hook); | ||
| 21 | struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb, | ||
| 22 | const struct sk_buff *oldskb, | ||
| 23 | __be16 protocol, int hoplimit); | ||
| 24 | void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb, | ||
| 25 | const struct sk_buff *oldskb, | ||
| 26 | const struct tcphdr *oth, unsigned int otcplen); | ||
| 27 | |||
| 18 | #endif /* _IPV6_NF_REJECT_H */ | 28 | #endif /* _IPV6_NF_REJECT_H */ |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 3d7292392fac..3ae969e3acf0 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -396,14 +396,12 @@ struct nft_rule { | |||
| 396 | /** | 396 | /** |
| 397 | * struct nft_trans - nf_tables object update in transaction | 397 | * struct nft_trans - nf_tables object update in transaction |
| 398 | * | 398 | * |
| 399 | * @rcu_head: rcu head to defer release of transaction data | ||
| 400 | * @list: used internally | 399 | * @list: used internally |
| 401 | * @msg_type: message type | 400 | * @msg_type: message type |
| 402 | * @ctx: transaction context | 401 | * @ctx: transaction context |
| 403 | * @data: internal information related to the transaction | 402 | * @data: internal information related to the transaction |
| 404 | */ | 403 | */ |
| 405 | struct nft_trans { | 404 | struct nft_trans { |
| 406 | struct rcu_head rcu_head; | ||
| 407 | struct list_head list; | 405 | struct list_head list; |
| 408 | int msg_type; | 406 | int msg_type; |
| 409 | struct nft_ctx ctx; | 407 | struct nft_ctx ctx; |
| @@ -530,6 +528,9 @@ enum nft_chain_type { | |||
| 530 | NFT_CHAIN_T_MAX | 528 | NFT_CHAIN_T_MAX |
| 531 | }; | 529 | }; |
| 532 | 530 | ||
| 531 | int nft_chain_validate_dependency(const struct nft_chain *chain, | ||
| 532 | enum nft_chain_type type); | ||
| 533 | |||
| 533 | struct nft_stats { | 534 | struct nft_stats { |
| 534 | u64 bytes; | 535 | u64 bytes; |
| 535 | u64 pkts; | 536 | u64 pkts; |
diff --git a/include/net/netfilter/nft_masq.h b/include/net/netfilter/nft_masq.h index c72729f954f4..e2a518b60e19 100644 --- a/include/net/netfilter/nft_masq.h +++ b/include/net/netfilter/nft_masq.h | |||
| @@ -13,4 +13,7 @@ int nft_masq_init(const struct nft_ctx *ctx, | |||
| 13 | 13 | ||
| 14 | int nft_masq_dump(struct sk_buff *skb, const struct nft_expr *expr); | 14 | int nft_masq_dump(struct sk_buff *skb, const struct nft_expr *expr); |
| 15 | 15 | ||
| 16 | int nft_masq_validate(const struct nft_ctx *ctx, const struct nft_expr *expr, | ||
| 17 | const struct nft_data **data); | ||
| 18 | |||
| 16 | #endif /* _NFT_MASQ_H_ */ | 19 | #endif /* _NFT_MASQ_H_ */ |
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h index a47790bcaa38..2a50a70ef587 100644 --- a/include/net/udp_tunnel.h +++ b/include/net/udp_tunnel.h | |||
| @@ -100,6 +100,15 @@ static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb, | |||
| 100 | return iptunnel_handle_offloads(skb, udp_csum, type); | 100 | return iptunnel_handle_offloads(skb, udp_csum, type); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | static inline void udp_tunnel_gro_complete(struct sk_buff *skb, int nhoff) | ||
| 104 | { | ||
| 105 | struct udphdr *uh; | ||
| 106 | |||
| 107 | uh = (struct udphdr *)(skb->data + nhoff - sizeof(struct udphdr)); | ||
| 108 | skb_shinfo(skb)->gso_type |= uh->check ? | ||
| 109 | SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL; | ||
| 110 | } | ||
| 111 | |||
| 103 | static inline void udp_tunnel_encap_enable(struct socket *sock) | 112 | static inline void udp_tunnel_encap_enable(struct socket *sock) |
| 104 | { | 113 | { |
| 105 | #if IS_ENABLED(CONFIG_IPV6) | 114 | #if IS_ENABLED(CONFIG_IPV6) |
diff --git a/include/net/vxlan.h b/include/net/vxlan.h index d5f59f3fc35d..57cccd0052e5 100644 --- a/include/net/vxlan.h +++ b/include/net/vxlan.h | |||
| @@ -8,6 +8,12 @@ | |||
| 8 | #define VNI_HASH_BITS 10 | 8 | #define VNI_HASH_BITS 10 |
| 9 | #define VNI_HASH_SIZE (1<<VNI_HASH_BITS) | 9 | #define VNI_HASH_SIZE (1<<VNI_HASH_BITS) |
| 10 | 10 | ||
| 11 | /* VXLAN protocol header */ | ||
| 12 | struct vxlanhdr { | ||
| 13 | __be32 vx_flags; | ||
| 14 | __be32 vx_vni; | ||
| 15 | }; | ||
| 16 | |||
| 11 | struct vxlan_sock; | 17 | struct vxlan_sock; |
| 12 | typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key); | 18 | typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key); |
| 13 | 19 | ||
| @@ -45,6 +51,18 @@ int vxlan_xmit_skb(struct vxlan_sock *vs, | |||
| 45 | __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, | 51 | __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, |
| 46 | __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); | 52 | __be16 src_port, __be16 dst_port, __be32 vni, bool xnet); |
| 47 | 53 | ||
| 54 | static inline bool vxlan_gso_check(struct sk_buff *skb) | ||
| 55 | { | ||
| 56 | if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) && | ||
| 57 | (skb->inner_protocol_type != ENCAP_TYPE_ETHER || | ||
| 58 | skb->inner_protocol != htons(ETH_P_TEB) || | ||
| 59 | (skb_inner_mac_header(skb) - skb_transport_header(skb) != | ||
| 60 | sizeof(struct udphdr) + sizeof(struct vxlanhdr)))) | ||
| 61 | return false; | ||
| 62 | |||
| 63 | return true; | ||
| 64 | } | ||
| 65 | |||
| 48 | /* IP header + UDP + VXLAN + Ethernet header */ | 66 | /* IP header + UDP + VXLAN + Ethernet header */ |
| 49 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) | 67 | #define VXLAN_HEADROOM (20 + 8 + 8 + 14) |
| 50 | /* IPv6 header + UDP + VXLAN + Ethernet header */ | 68 | /* IPv6 header + UDP + VXLAN + Ethernet header */ |
