Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 107076 | Differences between
and this patch

Collapse All | Expand All

(-)collectd-3.7.0-orig/src/libping/ping.c (+2 lines)
Lines 172-182 Link Here
172
    return -2;
172
    return -2;
173
  }
173
  }
174
174
175
  memset(buf, 0, sizeof(buf));
175
  icp = (struct icmp *)buf;
176
  icp = (struct icmp *)buf;
176
  icp->icmp_type  = ICMP_ECHO;
177
  icp->icmp_type  = ICMP_ECHO;
177
  icp->icmp_code  = 0;
178
  icp->icmp_code  = 0;
178
  icp->icmp_cksum = 0;
179
  icp->icmp_cksum = 0;
179
  icp->icmp_id    = getpid() & 0xFFFF;
180
  icp->icmp_id    = getpid() & 0xFFFF;
181
  icp->icmp_seq   = icp->icmp_id;
180
  icp->icmp_cksum = in_checksum((u_short *)icp, len );
182
  icp->icmp_cksum = in_checksum((u_short *)icp, len );
181
183
182
  if(( ss = sendto( datum->sock, buf, sizeof( buf ), 0, 
184
  if(( ss = sendto( datum->sock, buf, sizeof( buf ), 0, 

Return to bug 107076