aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-22 18:44:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-22 18:44:50 -0400
commit0b6280c62026168f79ff4dd1437df131bdfd24f2 (patch)
treeddbdbec7a8e0c31e8670a3f6368340f582059654 /include
parent1c8df7bd48347a707b437cfd0dad6b08a3b89ab6 (diff)
parent93a33a584e2a49a217118148125944fd02d47b54 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Don't leak ipvs->sysctl_tbl, from Tommi Rentala. 2) Fix neighbour table entry leak in rocker driver, from Ying Xue. 3) Do not emit bonding notifications for unregistered interfaces, from Nicolas Dichtel. 4) Set ipv6 flow label properly when in TIME_WAIT state, from Florent Fourcot. 5) Fix regression in ipv6 multicast filter test, from Henning Rogge. 6) do_replace() in various footables netfilter modules is missing a check for 0 counters in the datastructure provided by the user. Fix from Dave Jones, and found with trinity. 7) Fix RCU bug in packet scheduler classifier module unloads, from Daniel Borkmann. 8) Avoid deadlock in tcp_get_info() by using u64_sync. From Eric Dumzaet. 9) Input packet processing can race with inetdev_destroy() teardown, fix potential OOPS in ip_error() by explicitly testing whether the inetdev is still attached. From Eric W Biederman. 10) MLDv2 parser in bridge multicast code breaks too early while parsing. Fix from Thadeu Lima de Souza Cascardo. 11) Asking for settings on non-zero PHYID doesn't work because we do not import the command structure from the user and use the PHYID provided there. Fix from Arun Parameswaran. 12) Fix UDP checksums with IPV6 RAW sockets, from Vlad Yasevich. 13) Missing NF_TABLES depends for TPROXY etc can cause build failures, fix from Florian Westphal. 14) Fix netfilter conntrack to handle RFC5961 challenge ACKs properly, from Jesper Dangaard Brouer. 15) If netlink autobind retry fails, we have to reset the sockets portid back to zero. From Herbert Xu. 16) VXLAN netns exit code unregisters using wrong device, from John W Linville. 17) Add some USB device IDs to ath3k and btusb bluetooth drivers, from Dmitry Tunin and Wen-chien Jesse Sung. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits) bridge: fix lockdep splat net: core: 'ethtool' issue with querying phy settings bridge: fix parsing of MLDv2 reports ARM: zynq: DT: Use the zynq binding with macb net: macb: Disable half duplex gigabit on Zynq net: macb: Document zynq gem dt binding ipv4: fill in table id when replacing a route cdc_ncm: Fix tx_bytes statistics ipv4: Avoid crashing in ip_error tcp: fix a potential deadlock in tcp_get_info() net: sched: fix call_rcu() race on classifier module unloads net: phy: Make sure phy_start() always re-enables the phy interrupts ipv6: fix ECMP route replacement ipv6: do not delete previously existing ECMP routes if add fails Revert "netfilter: bridge: query conntrack about skb dnat" netfilter: ensure number of counters is >0 in do_replace() netfilter: nfnetlink_{log,queue}: Register pernet in first place tcp: don't over-send F-RTO probes tcp: only undo on partial ACKs in CA_Loss net/ipv6/udp: Fix ipv6 multicast socket filter regression ...
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