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.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 9139e8f6fdb1..f6a0af759932 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -368,7 +368,7 @@ struct dst_entry *inet_csk_route_req(struct sock *sk,
368 .proto = sk->sk_protocol, 368 .proto = sk->sk_protocol,
369 .flags = inet_sk_flowi_flags(sk), 369 .flags = inet_sk_flowi_flags(sk),
370 .uli_u = { .ports = 370 .uli_u = { .ports =
371 { .sport = inet_sk(sk)->sport, 371 { .sport = inet_sk(sk)->inet_sport,
372 .dport = ireq->rmt_port } } }; 372 .dport = ireq->rmt_port } } };
373 struct net *net = sock_net(sk); 373 struct net *net = sock_net(sk);
374 374
@@ -547,9 +547,9 @@ struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
547 newsk->sk_state = TCP_SYN_RECV; 547 newsk->sk_state = TCP_SYN_RECV;
548 newicsk->icsk_bind_hash = NULL; 548 newicsk->icsk_bind_hash = NULL;
549 549
550 inet_sk(newsk)->dport = inet_rsk(req)->rmt_port; 550 inet_sk(newsk)->inet_dport = inet_rsk(req)->rmt_port;
551 inet_sk(newsk)->num = ntohs(inet_rsk(req)->loc_port); 551 inet_sk(newsk)->inet_num = ntohs(inet_rsk(req)->loc_port);
552 inet_sk(newsk)->sport = inet_rsk(req)->loc_port; 552 inet_sk(newsk)->inet_sport = inet_rsk(req)->loc_port;
553 newsk->sk_write_space = sk_stream_write_space; 553 newsk->sk_write_space = sk_stream_write_space;
554 554
555 newicsk->icsk_retransmits = 0; 555 newicsk->icsk_retransmits = 0;
@@ -580,8 +580,8 @@ void inet_csk_destroy_sock(struct sock *sk)
580 /* It cannot be in hash table! */ 580 /* It cannot be in hash table! */
581 WARN_ON(!sk_unhashed(sk)); 581 WARN_ON(!sk_unhashed(sk));
582 582
583 /* If it has not 0 inet_sk(sk)->num, it must be bound */ 583 /* If it has not 0 inet_sk(sk)->inet_num, it must be bound */
584 WARN_ON(inet_sk(sk)->num && !inet_csk(sk)->icsk_bind_hash); 584 WARN_ON(inet_sk(sk)->inet_num && !inet_csk(sk)->icsk_bind_hash);
585 585
586 sk->sk_prot->destroy(sk); 586 sk->sk_prot->destroy(sk);
587 587
@@ -616,8 +616,8 @@ int inet_csk_listen_start(struct sock *sk, const int nr_table_entries)
616 * after validation is complete. 616 * after validation is complete.
617 */ 617 */
618 sk->sk_state = TCP_LISTEN; 618 sk->sk_state = TCP_LISTEN;
619 if (!sk->sk_prot->get_port(sk, inet->num)) { 619 if (!sk->sk_prot->get_port(sk, inet->inet_num)) {
620 inet->sport = htons(inet->num); 620 inet->inet_sport = htons(inet->inet_num);
621 621
622 sk_dst_reset(sk); 622 sk_dst_reset(sk);
623 sk->sk_prot->hash(sk); 623 sk->sk_prot->hash(sk);
@@ -693,8 +693,8 @@ void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr)
693 const struct inet_sock *inet = inet_sk(sk); 693 const struct inet_sock *inet = inet_sk(sk);
694 694
695 sin->sin_family = AF_INET; 695 sin->sin_family = AF_INET;
696 sin->sin_addr.s_addr = inet->daddr; 696 sin->sin_addr.s_addr = inet->inet_daddr;
697 sin->sin_port = inet->dport; 697 sin->sin_port = inet->inet_dport;
698} 698}
699 699
700EXPORT_SYMBOL_GPL(inet_csk_addr2sockaddr); 700EXPORT_SYMBOL_GPL(inet_csk_addr2sockaddr);