1. Alessio Caiazza
  2. olsrd

Commits

Ferry Huberts  committed b57529d

p2pd: fix recomputeIPv4HeaderChecksum function

There was a missing htons when putting the recomputed checksum
into the IP header

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>

  • Participants
  • Parent commits 519e0f9
  • Branches jsoninfo_clean

Comments (0)

Files changed (1)

File lib/p2pd/src/p2pd.c

View file
   /* step 3 */
   sum = ~sum & 0xffff;
 
-  header->ip_sum = (u_short) (sum);
+  header->ip_sum = htons((u_short)sum);
 }
 
 /* -------------------------------------------------------------------------