aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 2d0ef27f4ab9..7e50678e2471 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -60,10 +60,6 @@ static u32 dccp_decode_value_var(const unsigned char *bf, const u8 len)
60int dccp_parse_options(struct sock *sk, struct sk_buff *skb) 60int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
61{ 61{
62 struct dccp_sock *dp = dccp_sk(sk); 62 struct dccp_sock *dp = dccp_sk(sk);
63#ifdef CONFIG_IP_DCCP_DEBUG
64 const char *debug_prefix = dp->dccps_role == DCCP_ROLE_CLIENT ?
65 "CLIENT rx opt: " : "server rx opt: ";
66#endif
67 const struct dccp_hdr *dh = dccp_hdr(skb); 63 const struct dccp_hdr *dh = dccp_hdr(skb);
68 const u8 pkt_type = DCCP_SKB_CB(skb)->dccpd_type; 64 const u8 pkt_type = DCCP_SKB_CB(skb)->dccpd_type;
69 unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb); 65 unsigned char *options = (unsigned char *)dh + dccp_hdr_len(skb);
@@ -119,7 +115,7 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
119 goto out_invalid_option; 115 goto out_invalid_option;
120 116
121 opt_recv->dccpor_ndp = dccp_decode_value_var(value, len); 117 opt_recv->dccpor_ndp = dccp_decode_value_var(value, len);
122 dccp_pr_debug("%sNDP count=%d\n", debug_prefix, 118 dccp_pr_debug("%s rx opt: NDP count=%d\n", dccp_role(sk),
123 opt_recv->dccpor_ndp); 119 opt_recv->dccpor_ndp);
124 break; 120 break;
125 case DCCPO_CHANGE_L: 121 case DCCPO_CHANGE_L:
@@ -165,8 +161,8 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
165 dp->dccps_timestamp_echo = opt_recv->dccpor_timestamp; 161 dp->dccps_timestamp_echo = opt_recv->dccpor_timestamp;
166 dccp_timestamp(sk, &dp->dccps_timestamp_time); 162 dccp_timestamp(sk, &dp->dccps_timestamp_time);
167 163
168 dccp_pr_debug("%sTIMESTAMP=%u, ackno=%llu\n", 164 dccp_pr_debug("%s rx opt: TIMESTAMP=%u, ackno=%llu\n",
169 debug_prefix, opt_recv->dccpor_timestamp, 165 dccp_role(sk), opt_recv->dccpor_timestamp,
170 (unsigned long long) 166 (unsigned long long)
171 DCCP_SKB_CB(skb)->dccpd_ack_seq); 167 DCCP_SKB_CB(skb)->dccpd_ack_seq);
172 break; 168 break;
@@ -176,8 +172,8 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
176 172
177 opt_recv->dccpor_timestamp_echo = ntohl(*(__be32 *)value); 173 opt_recv->dccpor_timestamp_echo = ntohl(*(__be32 *)value);
178 174
179 dccp_pr_debug("%sTIMESTAMP_ECHO=%u, len=%d, ackno=%llu, ", 175 dccp_pr_debug("%s rx opt: TIMESTAMP_ECHO=%u, len=%d, "
180 debug_prefix, 176 "ackno=%llu, ", dccp_role(sk),
181 opt_recv->dccpor_timestamp_echo, 177 opt_recv->dccpor_timestamp_echo,
182 len + 2, 178 len + 2,
183 (unsigned long long) 179 (unsigned long long)
@@ -211,8 +207,8 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb)
211 if (elapsed_time > opt_recv->dccpor_elapsed_time) 207 if (elapsed_time > opt_recv->dccpor_elapsed_time)
212 opt_recv->dccpor_elapsed_time = elapsed_time; 208 opt_recv->dccpor_elapsed_time = elapsed_time;
213 209
214 dccp_pr_debug("%sELAPSED_TIME=%d\n", debug_prefix, 210 dccp_pr_debug("%s rx opt: ELAPSED_TIME=%d\n",
215 elapsed_time); 211 dccp_role(sk), elapsed_time);
216 break; 212 break;
217 /* 213 /*
218 * From RFC 4340, sec. 10.3: 214 * From RFC 4340, sec. 10.3: