- Timestamp:
- Apr 5, 2020 1:43:23 AM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Network/lwip-new/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/lwip-new/src/api/netdb.c
r47886 r83561 315 315 ai = (struct addrinfo *)memp_malloc(MEMP_NETDB); 316 316 if (ai == NULL) { 317 goto memerr;317 return EAI_MEMORY; 318 318 } 319 319 memset(ai, 0, total_size); … … 344 344 345 345 return 0; 346 memerr:347 if (ai != NULL) {348 memp_free(MEMP_NETDB, ai);349 }350 return EAI_MEMORY;351 346 } 352 347 -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv4/igmp.c
r47886 r83561 697 697 { 698 698 /* ensure the input value is > 0 */ 699 #ifdef LWIP_RAND 699 700 if (max_time == 0) { 700 701 max_time = 1; 701 702 } 702 #ifdef LWIP_RAND703 703 /* ensure the random value is > 0 */ 704 704 group->timer = (LWIP_RAND() % max_time); 705 if (group->timer == 0) { 706 group->timer = 1; 707 } 708 #else /* LWIP_RAND */ 709 /* ATTENTION: use this only if absolutely necessary! */ 710 group->timer = max_time / 2; 711 if (group->timer == 0) { 712 group->timer = 1; 713 } 705 714 #endif /* LWIP_RAND */ 706 715 } -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv6/mld6.c
r50189 r83561 500 500 #ifdef LWIP_RAND 501 501 /* Randomize maxresp. (if LWIP_RAND is supported) */ 502 maxresp = (LWIP_RAND() % (maxresp - 1)) + 1; 502 maxresp = LWIP_RAND() % maxresp; 503 if (maxresp == 0) { 504 maxresp = 1; 505 } 503 506 #endif /* LWIP_RAND */ 504 507 -
trunk/src/VBox/Devices/Network/lwip-new/src/core/ipv6/nd6.c
r50189 r83561 505 505 if (prefix_opt->flags & ND6_PREFIX_FLAG_ON_LINK) { 506 506 /* Add to on-link prefix list. */ 507 s8_t prefix; 507 508 508 509 /* Get a memory-aligned copy of the prefix. */ … … 510 511 511 512 /* find cache entry for this prefix. */ 512 i= nd6_get_onlink_prefix(ip6_current_dest_addr(), inp);513 if ( i< 0) {513 prefix = nd6_get_onlink_prefix(ip6_current_dest_addr(), inp); 514 if (prefix < 0) { 514 515 /* Create a new cache entry. */ 515 i= nd6_new_onlink_prefix(ip6_current_dest_addr(), inp);516 prefix = nd6_new_onlink_prefix(ip6_current_dest_addr(), inp); 516 517 } 517 if ( i>= 0) {518 prefix_list[ i].invalidation_timer = prefix_opt->valid_lifetime;518 if (prefix >= 0) { 519 prefix_list[prefix].invalidation_timer = prefix_opt->valid_lifetime; 519 520 520 521 #if LWIP_IPV6_AUTOCONFIG … … 522 523 /* Mark prefix as autonomous, so that address autoconfiguration can take place. 523 524 * Only OR flag, so that we don't over-write other flags (such as ADDRESS_DUPLICATE)*/ 524 prefix_list[ i].flags |= ND6_PREFIX_AUTOCONFIG_AUTONOMOUS;525 prefix_list[prefix].flags |= ND6_PREFIX_AUTOCONFIG_AUTONOMOUS; 525 526 } 526 527 #endif /* LWIP_IPV6_AUTOCONFIG */
Note:
See TracChangeset
for help on using the changeset viewer.