| 1201 | } |
| 1202 | |
| 1203 | static inline void |
| 1204 | advance_window(const struct secreplay *replay, uint64_t seq) |
| 1205 | { |
| 1206 | int i; |
| 1207 | uint64_t index, index_cur, diff; |
| 1208 | |
| 1209 | index_cur = replay->last >> IPSEC_REDUNDANT_BIT_SHIFTS; |
| 1210 | index = seq >> IPSEC_REDUNDANT_BIT_SHIFTS; |
| 1211 | diff = index - index_cur; |
| 1212 | |
| 1213 | if (diff > replay->bitmap_size) { |
| 1214 | /* something unusual in this case */ |
| 1215 | diff = replay->bitmap_size; |
| 1216 | } |
| 1217 | |
| 1218 | for (i = 0; i < diff; i++) { |
| 1219 | replay->bitmap[(i + index_cur + 1) |
| 1220 | & IPSEC_BITMAP_INDEX_MASK(replay->bitmap_size)] = 0; |
| 1221 | } |
| 1222 | } |
| 1223 | |
| 1224 | static inline void |
| 1225 | set_window(const struct secreplay *replay, uint64_t seq) |
no outgoing calls
no test coverage detected