input.c (08831700cc65f85a497d6b32b1c83ca84d71de4a) | input.c (a94f0f970549e63e54c80c4509db299c514d8c11) |
---|---|
1/* 2 * net/dccp/input.c 3 * 4 * An implementation of the DCCP protocol 5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 108 unchanged lines hidden (view full) --- 117 (ackno == DCCP_PKT_WITHOUT_ACK_SEQ || 118 between48(ackno, lawl, dp->dccps_awh))) { 119 dccp_update_gsr(sk, seqno); 120 121 if (dh->dccph_type != DCCP_PKT_SYNC && 122 (ackno != DCCP_PKT_WITHOUT_ACK_SEQ)) 123 dp->dccps_gar = ackno; 124 } else { | 1/* 2 * net/dccp/input.c 3 * 4 * An implementation of the DCCP protocol 5 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 108 unchanged lines hidden (view full) --- 117 (ackno == DCCP_PKT_WITHOUT_ACK_SEQ || 118 between48(ackno, lawl, dp->dccps_awh))) { 119 dccp_update_gsr(sk, seqno); 120 121 if (dh->dccph_type != DCCP_PKT_SYNC && 122 (ackno != DCCP_PKT_WITHOUT_ACK_SEQ)) 123 dp->dccps_gar = ackno; 124 } else { |
125 unsigned long now = jiffies; 126 /* 127 * Step 6: Check sequence numbers 128 * Otherwise, 129 * If P.type == Reset, 130 * Send Sync packet acknowledging S.GSR 131 * Otherwise, 132 * Send Sync packet acknowledging P.seqno 133 * Drop packet and return 134 * 135 * These Syncs are rate-limited as per RFC 4340, 7.5.4: 136 * at most 1 / (dccp_sync_rate_limit * HZ) Syncs per second. 137 */ 138 if (time_before(now, (dp->dccps_rate_last + 139 sysctl_dccp_sync_ratelimit))) 140 return 0; 141 |
|
125 DCCP_WARN("DCCP: Step 6 failed for %s packet, " 126 "(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and " 127 "(P.ackno %s or LAWL(%llu) <= P.ackno(%llu) <= S.AWH(%llu), " 128 "sending SYNC...\n", dccp_packet_name(dh->dccph_type), 129 (unsigned long long) lswl, (unsigned long long) seqno, 130 (unsigned long long) dp->dccps_swh, 131 (ackno == DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" 132 : "exists", 133 (unsigned long long) lawl, (unsigned long long) ackno, 134 (unsigned long long) dp->dccps_awh); | 142 DCCP_WARN("DCCP: Step 6 failed for %s packet, " 143 "(LSWL(%llu) <= P.seqno(%llu) <= S.SWH(%llu)) and " 144 "(P.ackno %s or LAWL(%llu) <= P.ackno(%llu) <= S.AWH(%llu), " 145 "sending SYNC...\n", dccp_packet_name(dh->dccph_type), 146 (unsigned long long) lswl, (unsigned long long) seqno, 147 (unsigned long long) dp->dccps_swh, 148 (ackno == DCCP_PKT_WITHOUT_ACK_SEQ) ? "doesn't exist" 149 : "exists", 150 (unsigned long long) lawl, (unsigned long long) ackno, 151 (unsigned long long) dp->dccps_awh); |
135 /* 136 * Step 6: Check sequence numbers 137 * Otherwise, 138 * If P.type == Reset, 139 * Send Sync packet acknowledging S.GSR 140 * Otherwise, 141 * Send Sync packet acknowledging P.seqno 142 * Drop packet and return 143 */ | 152 153 dp->dccps_rate_last = now; 154 |
144 if (dh->dccph_type == DCCP_PKT_RESET) 145 seqno = dp->dccps_gsr; 146 dccp_send_sync(sk, seqno, DCCP_PKT_SYNC); 147 return -1; 148 } 149 150 return 0; 151} --- 459 unchanged lines hidden --- | 155 if (dh->dccph_type == DCCP_PKT_RESET) 156 seqno = dp->dccps_gsr; 157 dccp_send_sync(sk, seqno, DCCP_PKT_SYNC); 158 return -1; 159 } 160 161 return 0; 162} --- 459 unchanged lines hidden --- |