aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-19 13:05:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-19 13:05:34 -0400
commit1200b6809dfd9d73bc4c7db76d288c35fa4b2ebe (patch)
tree552e03de245cdbd0780ca1215914edc4a26540f7 /net/ipv6/tcp_ipv6.c
parent6b5f04b6cf8ebab9a65d9c0026c650bb2538fd0f (diff)
parentfe30937b65354c7fec244caebbdaae68e28ca797 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Highlights: 1) Support more Realtek wireless chips, from Jes Sorenson. 2) New BPF types for per-cpu hash and arrap maps, from Alexei Starovoitov. 3) Make several TCP sysctls per-namespace, from Nikolay Borisov. 4) Allow the use of SO_REUSEPORT in order to do per-thread processing of incoming TCP/UDP connections. The muxing can be done using a BPF program which hashes the incoming packet. From Craig Gallek. 5) Add a multiplexer for TCP streams, to provide a messaged based interface. BPF programs can be used to determine the message boundaries. From Tom Herbert. 6) Add 802.1AE MACSEC support, from Sabrina Dubroca. 7) Avoid factorial complexity when taking down an inetdev interface with lots of configured addresses. We were doing things like traversing the entire address less for each address removed, and flushing the entire netfilter conntrack table for every address as well. 8) Add and use SKB bulk free infrastructure, from Jesper Brouer. 9) Allow offloading u32 classifiers to hardware, and implement for ixgbe, from John Fastabend. 10) Allow configuring IRQ coalescing parameters on a per-queue basis, from Kan Liang. 11) Extend ethtool so that larger link mode masks can be supported. From David Decotigny. 12) Introduce devlink, which can be used to configure port link types (ethernet vs Infiniband, etc.), port splitting, and switch device level attributes as a whole. From Jiri Pirko. 13) Hardware offload support for flower classifiers, from Amir Vadai. 14) Add "Local Checksum Offload". Basically, for a tunneled packet the checksum of the outer header is 'constant' (because with the checksum field filled into the inner protocol header, the payload of the outer frame checksums to 'zero'), and we can take advantage of that in various ways. From Edward Cree" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1548 commits) bonding: fix bond_get_stats() net: bcmgenet: fix dma api length mismatch net/mlx4_core: Fix backward compatibility on VFs phy: mdio-thunder: Fix some Kconfig typos lan78xx: add ndo_get_stats64 lan78xx: handle statistics counter rollover RDS: TCP: Remove unused constant RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket net: smc911x: convert pxa dma to dmaengine team: remove duplicate set of flag IFF_MULTICAST bonding: remove duplicate set of flag IFF_MULTICAST net: fix a comment typo ethernet: micrel: fix some error codes ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it bpf, dst: add and use dst_tclassid helper bpf: make skb->tc_classid also readable net: mvneta: bm: clarify dependencies cls_bpf: reset class and reuse major in da ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c ldmvsw: Add ldmvsw.c driver code ...
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3447859bdc57..711d209f9124 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -870,7 +870,8 @@ static void tcp_v6_send_reset(const struct sock *sk, struct sk_buff *skb)
870 * no RST generated if md5 hash doesn't match. 870 * no RST generated if md5 hash doesn't match.
871 */ 871 */
872 sk1 = inet6_lookup_listener(dev_net(skb_dst(skb)->dev), 872 sk1 = inet6_lookup_listener(dev_net(skb_dst(skb)->dev),
873 &tcp_hashinfo, &ipv6h->saddr, 873 &tcp_hashinfo, NULL, 0,
874 &ipv6h->saddr,
874 th->source, &ipv6h->daddr, 875 th->source, &ipv6h->daddr,
875 ntohs(th->source), tcp_v6_iif(skb)); 876 ntohs(th->source), tcp_v6_iif(skb));
876 if (!sk1) 877 if (!sk1)
@@ -1379,8 +1380,8 @@ static int tcp_v6_rcv(struct sk_buff *skb)
1379 hdr = ipv6_hdr(skb); 1380 hdr = ipv6_hdr(skb);
1380 1381
1381lookup: 1382lookup:
1382 sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest, 1383 sk = __inet6_lookup_skb(&tcp_hashinfo, skb, __tcp_hdrlen(th),
1383 inet6_iif(skb)); 1384 th->source, th->dest, inet6_iif(skb));
1384 if (!sk) 1385 if (!sk)
1385 goto no_tcp_socket; 1386 goto no_tcp_socket;
1386 1387
@@ -1445,7 +1446,7 @@ process:
1445 sk_incoming_cpu_update(sk); 1446 sk_incoming_cpu_update(sk);
1446 1447
1447 bh_lock_sock_nested(sk); 1448 bh_lock_sock_nested(sk);
1448 tcp_sk(sk)->segs_in += max_t(u16, 1, skb_shinfo(skb)->gso_segs); 1449 tcp_segs_in(tcp_sk(sk), skb);
1449 ret = 0; 1450 ret = 0;
1450 if (!sock_owned_by_user(sk)) { 1451 if (!sock_owned_by_user(sk)) {
1451 if (!tcp_prequeue(sk, skb)) 1452 if (!tcp_prequeue(sk, skb))
@@ -1504,6 +1505,7 @@ do_time_wait:
1504 struct sock *sk2; 1505 struct sock *sk2;
1505 1506
1506 sk2 = inet6_lookup_listener(dev_net(skb->dev), &tcp_hashinfo, 1507 sk2 = inet6_lookup_listener(dev_net(skb->dev), &tcp_hashinfo,
1508 skb, __tcp_hdrlen(th),
1507 &ipv6_hdr(skb)->saddr, th->source, 1509 &ipv6_hdr(skb)->saddr, th->source,
1508 &ipv6_hdr(skb)->daddr, 1510 &ipv6_hdr(skb)->daddr,
1509 ntohs(th->dest), tcp_v6_iif(skb)); 1511 ntohs(th->dest), tcp_v6_iif(skb));
@@ -1869,7 +1871,7 @@ struct proto tcpv6_prot = {
1869 .sendpage = tcp_sendpage, 1871 .sendpage = tcp_sendpage,
1870 .backlog_rcv = tcp_v6_do_rcv, 1872 .backlog_rcv = tcp_v6_do_rcv,
1871 .release_cb = tcp_release_cb, 1873 .release_cb = tcp_release_cb,
1872 .hash = inet_hash, 1874 .hash = inet6_hash,
1873 .unhash = inet_unhash, 1875 .unhash = inet_unhash,
1874 .get_port = inet_csk_get_port, 1876 .get_port = inet_csk_get_port,
1875 .enter_memory_pressure = tcp_enter_memory_pressure, 1877 .enter_memory_pressure = tcp_enter_memory_pressure,