aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_connection_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r--net/ipv4/inet_connection_sock.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 0c1ae68ee84b..21fcc5a9045f 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -335,6 +335,7 @@ struct dst_entry* inet_csk_route_req(struct sock *sk,
335 .saddr = ireq->loc_addr, 335 .saddr = ireq->loc_addr,
336 .tos = RT_CONN_FLAGS(sk) } }, 336 .tos = RT_CONN_FLAGS(sk) } },
337 .proto = sk->sk_protocol, 337 .proto = sk->sk_protocol,
338 .flags = inet_sk_flowi_flags(sk),
338 .uli_u = { .ports = 339 .uli_u = { .ports =
339 { .sport = inet_sk(sk)->sport, 340 { .sport = inet_sk(sk)->sport,
340 .dport = ireq->rmt_port } } }; 341 .dport = ireq->rmt_port } } };
@@ -515,6 +516,8 @@ struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
515 newicsk->icsk_bind_hash = NULL; 516 newicsk->icsk_bind_hash = NULL;
516 517
517 inet_sk(newsk)->dport = inet_rsk(req)->rmt_port; 518 inet_sk(newsk)->dport = inet_rsk(req)->rmt_port;
519 inet_sk(newsk)->num = ntohs(inet_rsk(req)->loc_port);
520 inet_sk(newsk)->sport = inet_rsk(req)->loc_port;
518 newsk->sk_write_space = sk_stream_write_space; 521 newsk->sk_write_space = sk_stream_write_space;
519 522
520 newicsk->icsk_retransmits = 0; 523 newicsk->icsk_retransmits = 0;