aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/rhashtable.h19
-rw-r--r--include/linux/skbuff.h1
-rw-r--r--include/linux/tcp.h2
-rw-r--r--include/net/inet_connection_sock.h5
-rw-r--r--include/uapi/linux/netfilter/nf_conntrack_tcp.h3
-rw-r--r--include/uapi/linux/rtnetlink.h2
6 files changed, 29 insertions, 3 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index dbcbcc59aa92..843ceca9a21e 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -17,6 +17,7 @@
17#ifndef _LINUX_RHASHTABLE_H 17#ifndef _LINUX_RHASHTABLE_H
18#define _LINUX_RHASHTABLE_H 18#define _LINUX_RHASHTABLE_H
19 19
20#include <linux/atomic.h>
20#include <linux/compiler.h> 21#include <linux/compiler.h>
21#include <linux/errno.h> 22#include <linux/errno.h>
22#include <linux/jhash.h> 23#include <linux/jhash.h>
@@ -100,6 +101,7 @@ struct rhashtable;
100 * @key_len: Length of key 101 * @key_len: Length of key
101 * @key_offset: Offset of key in struct to be hashed 102 * @key_offset: Offset of key in struct to be hashed
102 * @head_offset: Offset of rhash_head in struct to be hashed 103 * @head_offset: Offset of rhash_head in struct to be hashed
104 * @insecure_max_entries: Maximum number of entries (may be exceeded)
103 * @max_size: Maximum size while expanding 105 * @max_size: Maximum size while expanding
104 * @min_size: Minimum size while shrinking 106 * @min_size: Minimum size while shrinking
105 * @nulls_base: Base value to generate nulls marker 107 * @nulls_base: Base value to generate nulls marker
@@ -115,6 +117,7 @@ struct rhashtable_params {
115 size_t key_len; 117 size_t key_len;
116 size_t key_offset; 118 size_t key_offset;
117 size_t head_offset; 119 size_t head_offset;
120 unsigned int insecure_max_entries;
118 unsigned int max_size; 121 unsigned int max_size;
119 unsigned int min_size; 122 unsigned int min_size;
120 u32 nulls_base; 123 u32 nulls_base;
@@ -286,6 +289,18 @@ static inline bool rht_grow_above_100(const struct rhashtable *ht,
286 (!ht->p.max_size || tbl->size < ht->p.max_size); 289 (!ht->p.max_size || tbl->size < ht->p.max_size);
287} 290}
288 291
292/**
293 * rht_grow_above_max - returns true if table is above maximum
294 * @ht: hash table
295 * @tbl: current table
296 */
297static inline bool rht_grow_above_max(const struct rhashtable *ht,
298 const struct bucket_table *tbl)
299{
300 return ht->p.insecure_max_entries &&
301 atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
302}
303
289/* The bucket lock is selected based on the hash and protects mutations 304/* The bucket lock is selected based on the hash and protects mutations
290 * on a group of hash buckets. 305 * on a group of hash buckets.
291 * 306 *
@@ -589,6 +604,10 @@ restart:
589 goto out; 604 goto out;
590 } 605 }
591 606
607 err = -E2BIG;
608 if (unlikely(rht_grow_above_max(ht, tbl)))
609 goto out;
610
592 if (unlikely(rht_grow_above_100(ht, tbl))) { 611 if (unlikely(rht_grow_above_100(ht, tbl))) {
593slow_path: 612slow_path:
594 spin_unlock_bh(lock); 613 spin_unlock_bh(lock);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 66e374d62f64..f15154a879c7 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -176,6 +176,7 @@ struct nf_bridge_info {
176 struct net_device *physindev; 176 struct net_device *physindev;
177 struct net_device *physoutdev; 177 struct net_device *physoutdev;
178 char neigh_header[8]; 178 char neigh_header[8];
179 __be32 ipv4_daddr;
179}; 180};
180#endif 181#endif
181 182
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 3b2911502a8c..e8bbf403618f 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -158,6 +158,8 @@ struct tcp_sock {
158 * sum(delta(snd_una)), or how many bytes 158 * sum(delta(snd_una)), or how many bytes
159 * were acked. 159 * were acked.
160 */ 160 */
161 struct u64_stats_sync syncp; /* protects 64bit vars (cf tcp_get_info()) */
162
161 u32 snd_una; /* First byte we want an ack for */ 163 u32 snd_una; /* First byte we want an ack for */
162 u32 snd_sml; /* Last byte of the most recently transmitted small packet */ 164 u32 snd_sml; /* Last byte of the most recently transmitted small packet */
163 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ 165 u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 48a815823587..497bc14cdb85 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -129,9 +129,10 @@ struct inet_connection_sock {
129 129
130 u32 probe_timestamp; 130 u32 probe_timestamp;
131 } icsk_mtup; 131 } icsk_mtup;
132 u32 icsk_ca_priv[16];
133 u32 icsk_user_timeout; 132 u32 icsk_user_timeout;
134#define ICSK_CA_PRIV_SIZE (16 * sizeof(u32)) 133
134 u64 icsk_ca_priv[64 / sizeof(u64)];
135#define ICSK_CA_PRIV_SIZE (8 * sizeof(u64))
135}; 136};
136 137
137#define ICSK_TIME_RETRANS 1 /* Retransmit timer */ 138#define ICSK_TIME_RETRANS 1 /* Retransmit timer */
diff --git a/include/uapi/linux/netfilter/nf_conntrack_tcp.h b/include/uapi/linux/netfilter/nf_conntrack_tcp.h
index 9993a421201c..ef9f80f0f529 100644
--- a/include/uapi/linux/netfilter/nf_conntrack_tcp.h
+++ b/include/uapi/linux/netfilter/nf_conntrack_tcp.h
@@ -42,6 +42,9 @@ enum tcp_conntrack {
42/* The field td_maxack has been set */ 42/* The field td_maxack has been set */
43#define IP_CT_TCP_FLAG_MAXACK_SET 0x20 43#define IP_CT_TCP_FLAG_MAXACK_SET 0x20
44 44
45/* Marks possibility for expected RFC5961 challenge ACK */
46#define IP_CT_EXP_CHALLENGE_ACK 0x40
47
45struct nf_ct_tcp_flags { 48struct nf_ct_tcp_flags {
46 __u8 flags; 49 __u8 flags;
47 __u8 mask; 50 __u8 mask;
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 974db03f7b1a..17fb02f488da 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -337,7 +337,7 @@ struct rtnexthop {
337#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */ 337#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
338#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */ 338#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
339#define RTNH_F_ONLINK 4 /* Gateway is forced on link */ 339#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
340#define RTNH_F_EXTERNAL 8 /* Route installed externally */ 340#define RTNH_F_OFFLOAD 8 /* offloaded route */
341 341
342/* Macros to handle hexthops */ 342/* Macros to handle hexthops */
343 343