source: trunk/dports/net/nefu/files/patch-libtest-ping.c @ 11009

Last change on this file since 11009 was 11009, checked in by rshaw, 15 years ago

Adds patch (from author) to correct ping testing problems on Darwin.
Bumped revision.

  • Property svn:eol-style set to native
File size: 569 bytes
Line 
1--- libtest/ping.c.orig Wed Dec 22 10:00:09 2004
2+++ libtest/ping.c      Sun Jan 30 18:15:14 2005
3@@ -166,9 +166,10 @@
4        icmp_send->icmp_cksum = in_cksum((u_short *)icmp_send,
5                SEND_PACKET_SIZE );
6 
7-       if (( send_wrote = sendto( nefu_raw_socket, (char *)icmp_send,
8+       if ((( send_wrote = sendto( nefu_raw_socket, (char *)icmp_send,
9                SEND_PACKET_SIZE, 0, (struct sockaddr *)&t->t_sin,
10-               sizeof( struct sockaddr_in ))) < 0 ) {
11+               sizeof( struct sockaddr_in ))) < 0 ) &&
12+               ( errno != EHOSTDOWN )) {
13            report_printf( r, "sendto: %m" );
14            return( T_MAYBE_DOWN );
15        }
Note: See TracBrowser for help on using the repository browser.