diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-27 21:35:09 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-28 21:02:11 -0400 |
commit | 4f3608b787f471e8e6b9f39c5ed1edde5a2e7d04 (patch) | |
tree | 8caf222862ba3fda6e511bf483654a51d0ae54cc | |
parent | 39dccd9d922b595301e5d43ca7a30823d81393b6 (diff) |
[TCP] net/ipv4/tcp_input.c: trivial annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_input.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 46984ffd73cd..85c966316668 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2629,7 +2629,7 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | |||
2629 | switch(opcode) { | 2629 | switch(opcode) { |
2630 | case TCPOPT_MSS: | 2630 | case TCPOPT_MSS: |
2631 | if(opsize==TCPOLEN_MSS && th->syn && !estab) { | 2631 | if(opsize==TCPOLEN_MSS && th->syn && !estab) { |
2632 | u16 in_mss = ntohs(get_unaligned((__u16 *)ptr)); | 2632 | u16 in_mss = ntohs(get_unaligned((__be16 *)ptr)); |
2633 | if (in_mss) { | 2633 | if (in_mss) { |
2634 | if (opt_rx->user_mss && opt_rx->user_mss < in_mss) | 2634 | if (opt_rx->user_mss && opt_rx->user_mss < in_mss) |
2635 | in_mss = opt_rx->user_mss; | 2635 | in_mss = opt_rx->user_mss; |
@@ -2657,8 +2657,8 @@ void tcp_parse_options(struct sk_buff *skb, struct tcp_options_received *opt_rx, | |||
2657 | if ((estab && opt_rx->tstamp_ok) || | 2657 | if ((estab && opt_rx->tstamp_ok) || |
2658 | (!estab && sysctl_tcp_timestamps)) { | 2658 | (!estab && sysctl_tcp_timestamps)) { |
2659 | opt_rx->saw_tstamp = 1; | 2659 | opt_rx->saw_tstamp = 1; |
2660 | opt_rx->rcv_tsval = ntohl(get_unaligned((__u32 *)ptr)); | 2660 | opt_rx->rcv_tsval = ntohl(get_unaligned((__be32 *)ptr)); |
2661 | opt_rx->rcv_tsecr = ntohl(get_unaligned((__u32 *)(ptr+4))); | 2661 | opt_rx->rcv_tsecr = ntohl(get_unaligned((__be32 *)(ptr+4))); |
2662 | } | 2662 | } |
2663 | } | 2663 | } |
2664 | break; | 2664 | break; |
@@ -2695,8 +2695,8 @@ static int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th, | |||
2695 | return 0; | 2695 | return 0; |
2696 | } else if (tp->rx_opt.tstamp_ok && | 2696 | } else if (tp->rx_opt.tstamp_ok && |
2697 | th->doff == (sizeof(struct tcphdr)>>2)+(TCPOLEN_TSTAMP_ALIGNED>>2)) { | 2697 | th->doff == (sizeof(struct tcphdr)>>2)+(TCPOLEN_TSTAMP_ALIGNED>>2)) { |
2698 | __u32 *ptr = (__u32 *)(th + 1); | 2698 | __be32 *ptr = (__be32 *)(th + 1); |
2699 | if (*ptr == ntohl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | 2699 | if (*ptr == htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
2700 | | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) { | 2700 | | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) { |
2701 | tp->rx_opt.saw_tstamp = 1; | 2701 | tp->rx_opt.saw_tstamp = 1; |
2702 | ++ptr; | 2702 | ++ptr; |
@@ -3911,10 +3911,10 @@ int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, | |||
3911 | 3911 | ||
3912 | /* Check timestamp */ | 3912 | /* Check timestamp */ |
3913 | if (tcp_header_len == sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED) { | 3913 | if (tcp_header_len == sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED) { |
3914 | __u32 *ptr = (__u32 *)(th + 1); | 3914 | __be32 *ptr = (__be32 *)(th + 1); |
3915 | 3915 | ||
3916 | /* No? Slow path! */ | 3916 | /* No? Slow path! */ |
3917 | if (*ptr != ntohl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) | 3917 | if (*ptr != htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
3918 | | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) | 3918 | | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) |
3919 | goto slow_path; | 3919 | goto slow_path; |
3920 | 3920 | ||