Merge branch 'iov_iter' into for-next
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
* @list: used to maintain a list of currently available transports
|
||||
* @name: the human-readable name of the transport
|
||||
* @maxsize: transport provided maximum packet size
|
||||
* @pref: Preferences of this transport
|
||||
* @def: set if this transport should be considered the default
|
||||
* @create: member function to create a new connection on this transport
|
||||
* @close: member function to discard a connection on this transport
|
||||
|
||||
@@ -671,6 +671,8 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
|
||||
return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
|
||||
}
|
||||
|
||||
void ipv6_proxy_select_ident(struct sk_buff *skb);
|
||||
|
||||
int ip6_dst_hoplimit(struct dst_entry *dst);
|
||||
|
||||
static inline int ip6_sk_dst_hoplimit(struct ipv6_pinfo *np, struct flowi6 *fl6,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _IPV4_NF_REJECT_H
|
||||
#define _IPV4_NF_REJECT_H
|
||||
|
||||
#include <linux/skbuff.h>
|
||||
#include <net/ip.h>
|
||||
#include <net/icmp.h>
|
||||
|
||||
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)
|
||||
|
||||
void nf_send_reset(struct sk_buff *oldskb, int hook);
|
||||
|
||||
const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
|
||||
struct tcphdr *_oth, int hook);
|
||||
struct iphdr *nf_reject_iphdr_put(struct sk_buff *nskb,
|
||||
const struct sk_buff *oldskb,
|
||||
__be16 protocol, int ttl);
|
||||
void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb,
|
||||
const struct tcphdr *oth);
|
||||
|
||||
#endif /* _IPV4_NF_REJECT_H */
|
||||
|
||||
@@ -15,4 +15,14 @@ nf_send_unreach6(struct net *net, struct sk_buff *skb_in, unsigned char code,
|
||||
|
||||
void nf_send_reset6(struct net *net, struct sk_buff *oldskb, int hook);
|
||||
|
||||
const struct tcphdr *nf_reject_ip6_tcphdr_get(struct sk_buff *oldskb,
|
||||
struct tcphdr *otcph,
|
||||
unsigned int *otcplen, int hook);
|
||||
struct ipv6hdr *nf_reject_ip6hdr_put(struct sk_buff *nskb,
|
||||
const struct sk_buff *oldskb,
|
||||
__be16 protocol, int hoplimit);
|
||||
void nf_reject_ip6_tcphdr_put(struct sk_buff *nskb,
|
||||
const struct sk_buff *oldskb,
|
||||
const struct tcphdr *oth, unsigned int otcplen);
|
||||
|
||||
#endif /* _IPV6_NF_REJECT_H */
|
||||
|
||||
@@ -396,14 +396,12 @@ struct nft_rule {
|
||||
/**
|
||||
* struct nft_trans - nf_tables object update in transaction
|
||||
*
|
||||
* @rcu_head: rcu head to defer release of transaction data
|
||||
* @list: used internally
|
||||
* @msg_type: message type
|
||||
* @ctx: transaction context
|
||||
* @data: internal information related to the transaction
|
||||
*/
|
||||
struct nft_trans {
|
||||
struct rcu_head rcu_head;
|
||||
struct list_head list;
|
||||
int msg_type;
|
||||
struct nft_ctx ctx;
|
||||
@@ -530,6 +528,9 @@ enum nft_chain_type {
|
||||
NFT_CHAIN_T_MAX
|
||||
};
|
||||
|
||||
int nft_chain_validate_dependency(const struct nft_chain *chain,
|
||||
enum nft_chain_type type);
|
||||
|
||||
struct nft_stats {
|
||||
u64 bytes;
|
||||
u64 pkts;
|
||||
|
||||
@@ -13,4 +13,7 @@ int nft_masq_init(const struct nft_ctx *ctx,
|
||||
|
||||
int nft_masq_dump(struct sk_buff *skb, const struct nft_expr *expr);
|
||||
|
||||
int nft_masq_validate(const struct nft_ctx *ctx, const struct nft_expr *expr,
|
||||
const struct nft_data **data);
|
||||
|
||||
#endif /* _NFT_MASQ_H_ */
|
||||
|
||||
@@ -100,6 +100,15 @@ static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb,
|
||||
return iptunnel_handle_offloads(skb, udp_csum, type);
|
||||
}
|
||||
|
||||
static inline void udp_tunnel_gro_complete(struct sk_buff *skb, int nhoff)
|
||||
{
|
||||
struct udphdr *uh;
|
||||
|
||||
uh = (struct udphdr *)(skb->data + nhoff - sizeof(struct udphdr));
|
||||
skb_shinfo(skb)->gso_type |= uh->check ?
|
||||
SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL;
|
||||
}
|
||||
|
||||
static inline void udp_tunnel_encap_enable(struct socket *sock)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
#define VNI_HASH_BITS 10
|
||||
#define VNI_HASH_SIZE (1<<VNI_HASH_BITS)
|
||||
|
||||
/* VXLAN protocol header */
|
||||
struct vxlanhdr {
|
||||
__be32 vx_flags;
|
||||
__be32 vx_vni;
|
||||
};
|
||||
|
||||
struct vxlan_sock;
|
||||
typedef void (vxlan_rcv_t)(struct vxlan_sock *vh, struct sk_buff *skb, __be32 key);
|
||||
|
||||
@@ -45,6 +51,18 @@ int vxlan_xmit_skb(struct vxlan_sock *vs,
|
||||
__be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df,
|
||||
__be16 src_port, __be16 dst_port, __be32 vni, bool xnet);
|
||||
|
||||
static inline bool vxlan_gso_check(struct sk_buff *skb)
|
||||
{
|
||||
if ((skb_shinfo(skb)->gso_type & SKB_GSO_UDP_TUNNEL) &&
|
||||
(skb->inner_protocol_type != ENCAP_TYPE_ETHER ||
|
||||
skb->inner_protocol != htons(ETH_P_TEB) ||
|
||||
(skb_inner_mac_header(skb) - skb_transport_header(skb) !=
|
||||
sizeof(struct udphdr) + sizeof(struct vxlanhdr))))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* IP header + UDP + VXLAN + Ethernet header */
|
||||
#define VXLAN_HEADROOM (20 + 8 + 8 + 14)
|
||||
/* IPv6 header + UDP + VXLAN + Ethernet header */
|
||||
|
||||
Reference in New Issue
Block a user