Changeset fd8e8e1 in mainline
- Timestamp:
- 2010-10-30T19:39:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 069015f2, 417b12c
- Parents:
- 768ea9e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/ip/ip.c
r768ea9e rfd8e8e1 652 652 middle_header = (ip_header_ref) packet_prefix(next, 653 653 IP_HEADER_LENGTH(last_header)); 654 if (!middle_header) 654 if (!middle_header) { 655 free(last_header); 655 656 return ENOMEM; 657 } 656 658 657 659 memcpy(middle_header, last_header, … … 667 669 IP_HEADER_CHECKSUM(middle_header); 668 670 if (destination) { 669 ERROR_PROPAGATE(packet_set_addr(next, NULL,671 if (ERROR_OCCURRED(packet_set_addr(next, NULL, 670 672 (uint8_t *) destination->value, 671 673 CONVERT_SIZE(char, uint8_t, 672 destination->length))); 674 destination->length)))) { 675 free(last_header); 676 return ERROR_CODE; 677 } 673 678 } 674 679 length += packet_get_data_length(next); … … 678 683 middle_header = (ip_header_ref) packet_prefix(next, 679 684 IP_HEADER_LENGTH(last_header)); 680 if (!middle_header) 685 if (!middle_header) { 686 free(last_header); 681 687 return ENOMEM; 688 } 682 689 683 690 memcpy(middle_header, last_header, … … 692 699 IP_HEADER_CHECKSUM(middle_header); 693 700 if (destination) { 694 ERROR_PROPAGATE(packet_set_addr(next, NULL,701 if (ERROR_OCCURRED(packet_set_addr(next, NULL, 695 702 (uint8_t *) destination->value, 696 CONVERT_SIZE(char, uint8_t, destination->length))); 703 CONVERT_SIZE(char, uint8_t, 704 destination->length)))) { 705 free(last_header); 706 return ERROR_CODE; 707 } 697 708 } 698 709 length += packet_get_data_length(next);
Note:
See TracChangeset
for help on using the changeset viewer.