Skip to content

Commit

Permalink
Added missing lwip_md5_init and lwip_md5_free as suggested by:
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas.larsson authored and Jarno Lamsa committed Feb 9, 2018
1 parent 67772a5 commit 34099ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_tcp_isn.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,11 @@ lwip_hook_tcp_isn(const void *local_ip_ptr, u16_t local_port,
/* The secret and padding are already filled in. */

/* Generate the hash, using MD5. */
lwip_md5_init(&ctx);
lwip_md5_starts(&ctx);
lwip_md5_update(&ctx, input, sizeof(input));
lwip_md5_finish(&ctx, output);
lwip_md5_free(&ctx);

/* Arbitrarily take the first 32 bits from the generated hash. */
MEMCPY(&isn, output, sizeof(isn));
Expand Down

0 comments on commit 34099ba

Please sign in to comment.