diff options
author | David S. Miller <davem@davemloft.net> | 2016-02-23 00:09:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-23 00:09:14 -0500 |
commit | b633353115e352d3c31c12d4c61978c810f05ea1 (patch) | |
tree | 055174a1b31a3e10fd2c505788fe6487b0028d00 /net/ipv6/tcp_ipv6.c | |
parent | b1d95ae5c5bd3deba84d00c4f83d7d0836b5936f (diff) | |
parent | dea08e604408d0303e2332896c5fdd8c1f7d79a2 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/phy/bcm7xxx.c
drivers/net/phy/marvell.c
drivers/net/vxlan.c
All three conflicts were cases of simple overlapping changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 9977b6f19f2a..33f2820181f9 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -327,6 +327,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
327 | struct tcp_sock *tp; | 327 | struct tcp_sock *tp; |
328 | __u32 seq, snd_una; | 328 | __u32 seq, snd_una; |
329 | struct sock *sk; | 329 | struct sock *sk; |
330 | bool fatal; | ||
330 | int err; | 331 | int err; |
331 | 332 | ||
332 | sk = __inet6_lookup_established(net, &tcp_hashinfo, | 333 | sk = __inet6_lookup_established(net, &tcp_hashinfo, |
@@ -345,8 +346,9 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
345 | return; | 346 | return; |
346 | } | 347 | } |
347 | seq = ntohl(th->seq); | 348 | seq = ntohl(th->seq); |
349 | fatal = icmpv6_err_convert(type, code, &err); | ||
348 | if (sk->sk_state == TCP_NEW_SYN_RECV) | 350 | if (sk->sk_state == TCP_NEW_SYN_RECV) |
349 | return tcp_req_err(sk, seq); | 351 | return tcp_req_err(sk, seq, fatal); |
350 | 352 | ||
351 | bh_lock_sock(sk); | 353 | bh_lock_sock(sk); |
352 | if (sock_owned_by_user(sk) && type != ICMPV6_PKT_TOOBIG) | 354 | if (sock_owned_by_user(sk) && type != ICMPV6_PKT_TOOBIG) |
@@ -400,7 +402,6 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
400 | goto out; | 402 | goto out; |
401 | } | 403 | } |
402 | 404 | ||
403 | icmpv6_err_convert(type, code, &err); | ||
404 | 405 | ||
405 | /* Might be for an request_sock */ | 406 | /* Might be for an request_sock */ |
406 | switch (sk->sk_state) { | 407 | switch (sk->sk_state) { |
@@ -1387,7 +1388,7 @@ process: | |||
1387 | 1388 | ||
1388 | if (sk->sk_state == TCP_NEW_SYN_RECV) { | 1389 | if (sk->sk_state == TCP_NEW_SYN_RECV) { |
1389 | struct request_sock *req = inet_reqsk(sk); | 1390 | struct request_sock *req = inet_reqsk(sk); |
1390 | struct sock *nsk = NULL; | 1391 | struct sock *nsk; |
1391 | 1392 | ||
1392 | sk = req->rsk_listener; | 1393 | sk = req->rsk_listener; |
1393 | tcp_v6_fill_cb(skb, hdr, th); | 1394 | tcp_v6_fill_cb(skb, hdr, th); |
@@ -1395,24 +1396,24 @@ process: | |||
1395 | reqsk_put(req); | 1396 | reqsk_put(req); |
1396 | goto discard_it; | 1397 | goto discard_it; |
1397 | } | 1398 | } |
1398 | if (likely(sk->sk_state == TCP_LISTEN)) { | 1399 | if (unlikely(sk->sk_state != TCP_LISTEN)) { |
1399 | nsk = tcp_check_req(sk, skb, req, false); | ||
1400 | } else { | ||
1401 | inet_csk_reqsk_queue_drop_and_put(sk, req); | 1400 | inet_csk_reqsk_queue_drop_and_put(sk, req); |
1402 | goto lookup; | 1401 | goto lookup; |
1403 | } | 1402 | } |
1403 | sock_hold(sk); | ||
1404 | nsk = tcp_check_req(sk, skb, req, false); | ||
1404 | if (!nsk) { | 1405 | if (!nsk) { |
1405 | reqsk_put(req); | 1406 | reqsk_put(req); |
1406 | goto discard_it; | 1407 | goto discard_and_relse; |
1407 | } | 1408 | } |
1408 | if (nsk == sk) { | 1409 | if (nsk == sk) { |
1409 | sock_hold(sk); | ||
1410 | reqsk_put(req); | 1410 | reqsk_put(req); |
1411 | tcp_v6_restore_cb(skb); | 1411 | tcp_v6_restore_cb(skb); |
1412 | } else if (tcp_child_process(sk, nsk, skb)) { | 1412 | } else if (tcp_child_process(sk, nsk, skb)) { |
1413 | tcp_v6_send_reset(nsk, skb); | 1413 | tcp_v6_send_reset(nsk, skb); |
1414 | goto discard_it; | 1414 | goto discard_and_relse; |
1415 | } else { | 1415 | } else { |
1416 | sock_put(sk); | ||
1416 | return 0; | 1417 | return 0; |
1417 | } | 1418 | } |
1418 | } | 1419 | } |