diff options
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/bluetooth/bluetooth.h | 3 | ||||
| -rw-r--r-- | include/net/dst.h | 6 | ||||
| -rw-r--r-- | include/net/flow_keys.h | 1 | ||||
| -rw-r--r-- | include/net/inet_frag.h | 9 | ||||
| -rw-r--r-- | include/net/ip_fib.h | 12 | ||||
| -rw-r--r-- | include/net/ip_vs.h | 12 | ||||
| -rw-r--r-- | include/net/ipip.h | 16 | ||||
| -rw-r--r-- | include/net/lib80211.h | 4 | ||||
| -rw-r--r-- | include/net/tcp.h | 4 | 
9 files changed, 45 insertions, 22 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 9531beee09b..ea81f0ef649 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -226,7 +226,6 @@ struct bt_sock_list {  	struct hlist_head head;  	rwlock_t          lock;  #ifdef CONFIG_PROC_FS -        struct file_operations   fops;          int (* custom_seq_show)(struct seq_file *, void *);  #endif  }; @@ -319,7 +318,7 @@ extern void hci_sock_cleanup(void);  extern int bt_sysfs_init(void);  extern void bt_sysfs_cleanup(void); -extern int  bt_procfs_init(struct module* module, struct net *net, const char *name, +extern int  bt_procfs_init(struct net *net, const char *name,  			   struct bt_sock_list* sk_list,  			   int (* seq_show)(struct seq_file *, void *));  extern void bt_procfs_cleanup(struct net *net, const char *name); diff --git a/include/net/dst.h b/include/net/dst.h index 853cda11e51..1f8fd109e22 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -413,13 +413,15 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,  static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr)  { -	return dst->ops->neigh_lookup(dst, NULL, daddr); +	struct neighbour *n = dst->ops->neigh_lookup(dst, NULL, daddr); +	return IS_ERR(n) ? NULL : n;  }  static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst,  						     struct sk_buff *skb)  { -	return dst->ops->neigh_lookup(dst, skb, NULL); +	struct neighbour *n =  dst->ops->neigh_lookup(dst, skb, NULL); +	return IS_ERR(n) ? NULL : n;  }  static inline void dst_link_failure(struct sk_buff *skb) diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 80461c1ae9e..bb8271d487b 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h @@ -9,6 +9,7 @@ struct flow_keys {  		__be32 ports;  		__be16 port16[2];  	}; +	u16 thoff;  	u8 ip_proto;  }; diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 76c3fe5ecc2..0a1dcc2fa2f 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -43,6 +43,13 @@ struct inet_frag_queue {  #define INETFRAGS_HASHSZ		64 +/* averaged: + * max_depth = default ipfrag_high_thresh / INETFRAGS_HASHSZ / + *	       rounded up (SKB_TRUELEN(0) + sizeof(struct ipq or + *	       struct frag_queue)) + */ +#define INETFRAGS_MAXDEPTH		128 +  struct inet_frags {  	struct hlist_head	hash[INETFRAGS_HASHSZ];  	/* This rwlock is a global lock (seperate per IPv4, IPv6 and @@ -76,6 +83,8 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force);  struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,  		struct inet_frags *f, void *key, unsigned int hash)  	__releases(&f->lock); +void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, +				   const char *prefix);  static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f)  { diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 9497be1ad4c..e49db91593a 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -152,18 +152,16 @@ struct fib_result_nl {  };  #ifdef CONFIG_IP_ROUTE_MULTIPATH -  #define FIB_RES_NH(res)		((res).fi->fib_nh[(res).nh_sel]) - -#define FIB_TABLE_HASHSZ 2 -  #else /* CONFIG_IP_ROUTE_MULTIPATH */ -  #define FIB_RES_NH(res)		((res).fi->fib_nh[0]) +#endif /* CONFIG_IP_ROUTE_MULTIPATH */ +#ifdef CONFIG_IP_MULTIPLE_TABLES  #define FIB_TABLE_HASHSZ 256 - -#endif /* CONFIG_IP_ROUTE_MULTIPATH */ +#else +#define FIB_TABLE_HASHSZ 2 +#endif  extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 68c69d54d39..fce8e6b66d5 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -976,6 +976,7 @@ struct netns_ipvs {  	int			sysctl_sync_retries;  	int			sysctl_nat_icmp_send;  	int			sysctl_pmtu_disc; +	int			sysctl_backup_only;  	/* ip_vs_lblc */  	int			sysctl_lblc_expiration; @@ -1067,6 +1068,12 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs)  	return ipvs->sysctl_pmtu_disc;  } +static inline int sysctl_backup_only(struct netns_ipvs *ipvs) +{ +	return ipvs->sync_state & IP_VS_STATE_BACKUP && +	       ipvs->sysctl_backup_only; +} +  #else  static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs) @@ -1114,6 +1121,11 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs)  	return 1;  } +static inline int sysctl_backup_only(struct netns_ipvs *ipvs) +{ +	return 0; +} +  #endif  /* diff --git a/include/net/ipip.h b/include/net/ipip.h index fd19625ff99..982141c1520 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h @@ -77,15 +77,11 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb,  {  	struct iphdr *iph = ip_hdr(skb); -	if (iph->frag_off & htons(IP_DF)) -		iph->id	= 0; -	else { -		/* Use inner packet iph-id if possible. */ -		if (skb->protocol == htons(ETH_P_IP) && old_iph->id) -			iph->id	= old_iph->id; -		else -			__ip_select_ident(iph, dst, -					  (skb_shinfo(skb)->gso_segs ?: 1) - 1); -	} +	/* Use inner packet iph-id if possible. */ +	if (skb->protocol == htons(ETH_P_IP) && old_iph->id) +		iph->id	= old_iph->id; +	else +		__ip_select_ident(iph, dst, +				  (skb_shinfo(skb)->gso_segs ?: 1) - 1);  }  #endif diff --git a/include/net/lib80211.h b/include/net/lib80211.h index d178c26a555..be95b926280 100644 --- a/include/net/lib80211.h +++ b/include/net/lib80211.h @@ -30,6 +30,8 @@  #include <linux/skbuff.h>  #include <linux/ieee80211.h>  #include <linux/timer.h> +#include <linux/seq_file.h> +  /* print_ssid() is intended to be used in debug (and possibly error)   * messages. It should never be used for passing ssid to user space. */  const char *print_ssid(char *buf, const char *ssid, u8 ssid_len); @@ -75,7 +77,7 @@ struct lib80211_crypto_ops {  	/* procfs handler for printing out key information and possible  	 * statistics */ -	char *(*print_stats) (char *p, void *priv); +	void (*print_stats) (struct seq_file *m, void *priv);  	/* Crypto specific flag get/set for configuration settings */  	unsigned long (*get_flags) (void *priv); diff --git a/include/net/tcp.h b/include/net/tcp.h index 23f2e98d4b6..cf0694d4ad6 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1045,6 +1045,10 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)  	if (sysctl_tcp_low_latency || !tp->ucopy.task)  		return false; +	if (skb->len <= tcp_hdrlen(skb) && +	    skb_queue_len(&tp->ucopy.prequeue) == 0) +		return false; +  	__skb_queue_tail(&tp->ucopy.prequeue, skb);  	tp->ucopy.memory += skb->truesize;  	if (tp->ucopy.memory > sk->sk_rcvbuf) {  |