Changes in uspace/srv/net/inetsrv/reass.c [fc6abbe:feeac0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/inetsrv/reass.c
rfc6abbe rfeeac0d 196 196 return ENOMEM; 197 197 198 memcpy(data_copy, packet->data, packet->size);199 200 198 frag->packet = *packet; 201 199 frag->packet.data = data_copy; … … 218 216 break; 219 217 220 link = li st_next(link, &rdg->frags);218 link = link->next; 221 219 } 222 220 … … 242 240 assert(!list_empty(&rdg->frags)); 243 241 244 link = list_first(&rdg->frags); 245 assert(link != NULL); 246 247 frag = list_get_instance(link, reass_frag_t, 242 /* First fragment must be at offset zero */ 243 frag = list_get_instance(list_first(&rdg->frags), reass_frag_t, 248 244 dgram_link); 249 250 /* First fragment must be at offset zero */251 245 if (frag->packet.offs != 0) 252 246 return false; 253 247 254 248 prev = frag; 255 256 249 while (true) { 257 link = list_next(link, &rdg->frags);250 link = frag->dgram_link.next; 258 251 if (link == NULL) 259 break;252 return false; 260 253 261 254 /* Each next fragment must follow immediately or overlap */ … … 295 288 uint8_t proto; 296 289 reass_frag_t *frag; 297 int rc;298 290 299 291 /* … … 315 307 316 308 /* Upper bound for fragment offset field */ 317 fragoff_limit = 1 << (FF_FRAGOFF_h - FF_FRAGOFF_l + 1);309 fragoff_limit = 1 << (FF_FRAGOFF_h - FF_FRAGOFF_l); 318 310 319 311 /* Verify that total size of datagram is within reasonable bounds */ … … 351 343 } 352 344 353 rc = inet_recv_dgram_local(&dgram, proto); 354 free(dgram.data); 355 return rc; 345 return inet_recv_dgram_local(&dgram, proto); 356 346 } 357 347
Note:
See TracChangeset
for help on using the changeset viewer.