Skip to content

Commit

Permalink
fixed checksum calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
zocker007 authored and Merlin Krümmel committed Jun 21, 2021
1 parent 22cddf4 commit 746276f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ static void buildIgmp(uint32_t src, uint32_t dst, int type, int code, uint32_t g
igmp->igmp_code = code;
igmp->igmp_group.s_addr = group;
igmp->igmp_cksum = 0;
igmp->igmp_cksum = inetChksum((unsigned short *)igmp,
IP_HEADER_RAOPT_LEN + datalen);
igmp->igmp_misc = conf->robustnessValue & 0x7;
igmp->igmp_qqi = conf->queryInterval;
igmp->igmp_numsrc = 0;
igmp->igmp_cksum = inetChksum((unsigned short *)igmp,
IGMP_V3_QUERY_MINLEN + datalen);

}

Expand Down

0 comments on commit 746276f

Please sign in to comment.