1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
$NetBSD: patch-aa,v 1.2 2003/02/15 22:39:50 is Exp $
--- mini_sendmail.c.orig Thu Nov 21 21:27:55 2002
+++ mini_sendmail.c
@@ -129,6 +129,8 @@
timeout = atoi( &(argv[argn][2]) );
else if ( strcmp( argv[argn], "-v" ) == 0 )
verbose = 1;
+ else if ( strcmp( argv[argn], "-i" ) == 0 )
+ /* do nothing */ ;
else
usage();
++argn;
@@ -575,14 +577,16 @@
sock_family = PF_INET6;
#ifdef DO_MINUS_S
- if ( inet_pton( PF_INET, server, (void*) &sa4.sin_addr ) == 0 )
+
+ (void) memset( (void*) &sa4, 0, sizeof(sa4) );
+ if ( inet_pton( AF_INET, server, (void*) &sa4.sin_addr ) == 1 )
{
sock_family = PF_INET;
sa4.sin_port = htons( SMTP_PORT );
sa_len = sizeof(sa4);
(void) memmove( &sa, &sa4, sa_len );
}
- else if ( inet_pton( PF_INET6, server, (void*) &sa.sin6_addr ) == -1 )
+ else if ( inet_pton( AF_INET6, server, (void*) &sa.sin6_addr ) != 1 )
{
#ifdef DO_DNS
(void) memset( &hints, 0, sizeof(hints) );
|