diff --git a/functions.c b/functions.c index 5528440..57491c9 100644 --- a/functions.c +++ b/functions.c @@ -587,7 +587,7 @@ u_int16_t l4_sum(u_int16_t *buff, int words, u_int16_t *srcaddr, u_int16_t *dsta /* Checksum enhancement - Support for odd byte packets */ if((htons(len) % 2) == 1) { last_word = *((u_int8_t *)buff + ntohs(len) - 1); - last_word = (htons(last_word) << 8); + last_word = htons(last_word << 8); } else { /* Original checksum function */ last_word = 0;