Patch to fix ip cksum errors. From mccanne@ee.lbl.gov (Steven McCanne).
This commit is contained in:
parent
730768feb0
commit
de3a00ee3d
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)igmp.c 8.1 (Berkeley) 7/19/93
|
||||
* $Id: igmp.c,v 1.6 1994/06/04 08:13:23 mycroft Exp $
|
||||
* $Id: igmp.c,v 1.7 1994/06/09 15:59:47 brezak Exp $
|
||||
*/
|
||||
|
||||
/* Internet Group Management Protocol (IGMP) routines. */
|
||||
@ -285,12 +285,16 @@ igmp_sendreport(inm)
|
||||
ip->ip_src.s_addr = INADDR_ANY;
|
||||
ip->ip_dst = inm->inm_addr;
|
||||
|
||||
igmp = (struct igmp *)(ip + 1);
|
||||
m->m_data += sizeof(struct ip);
|
||||
m->m_len -= sizeof(struct ip);
|
||||
igmp = mtod(m, struct igmp *);
|
||||
igmp->igmp_type = IGMP_HOST_MEMBERSHIP_REPORT;
|
||||
igmp->igmp_code = 0;
|
||||
igmp->igmp_group = inm->inm_addr;
|
||||
igmp->igmp_cksum = 0;
|
||||
igmp->igmp_cksum = in_cksum(m, IGMP_MINLEN);
|
||||
m->m_data -= sizeof(struct ip);
|
||||
m->m_len += sizeof(struct ip);
|
||||
|
||||
imo = &simo;
|
||||
bzero((caddr_t)imo, sizeof(*imo));
|
||||
|
Loading…
Reference in New Issue
Block a user