pull DaemonPortOptions modifier for "optional address", from

8.12.x change (Modifiers=O).
this will let us use the same sendmail.cf file on IPv4/v6, and IPv4-only
kernels. (we do not really need netbsd-proto-IPv4only.cf any more)
This commit is contained in:
itojun 2001-01-15 17:49:25 +00:00
parent 880b841888
commit ef39bb4e09
3 changed files with 16 additions and 3 deletions

View File

@ -270,6 +270,8 @@ getrequests(e)
{
if (timenow < Daemons[idx].d_refuse_connections_until)
continue;
if (bitnset(D_DISABLE, Daemons[idx].d_flags))
continue;
if (refuseconnections(Daemons[idx].d_name, e, idx))
{
if (Daemons[idx].d_socket >= 0)
@ -880,6 +882,14 @@ opendaemonsocket(d, firsttime)
{
save_errno = errno;
syserr("opendaemonsocket: daemon %s: can't create server SMTP socket", d->d_name);
if (bitnset(D_OPTIONAL, d->d_flags) &&
(save_errno == EAFNOSUPPORT ||
save_errno == EPROTONOSUPPORT))
{
syserr("opendaemonsocket: daemon %s: optional socket disabled", d->d_name);
setbitn(D_DISABLE, d->d_flags);
return -1;
}
severe:
if (LogLevel > 0)
sm_syslog(LOG_ALERT, NOQID,

View File

@ -1444,6 +1444,8 @@ struct termescape
#define D_NOCANON 'C' /* no canonification (cf) */
#define D_NOETRN 'E' /* no ETRN (MSA) */
#define D_ETRNONLY ((char)0x01) /* allow only ETRN (disk low) */
#define D_OPTIONAL 'O' /* optional socket */
#define D_DISABLE ((char)0x02) /* optional socket disabled */
/* Flags for submitmode */
#define SUBMIT_UNKNOWN 0x0000 /* unknown agent type */

View File

@ -1,4 +1,4 @@
# $NetBSD: netbsd-proto.mc,v 1.7 2000/08/25 02:54:29 hubertf Exp $
# $NetBSD: netbsd-proto.mc,v 1.8 2001/01/15 17:49:26 itojun Exp $
#
# This is the prototype file for a configuration that supports SMTP
@ -8,6 +8,7 @@
# The path is relative to ${CFDIR}/cf, see Makefile:
include(`../../../../usr.sbin/sendmail/cf/cf/netbsd-proto-IPv4only.mc')
# Enable IPv6:
# Enable IPv6. IPv6 is marked as optional so the configuration file
# can be used on IPV4-only kernel as well.
DAEMON_OPTIONS(`Family=inet, address=0.0.0.0, Name=MTA')dnl
DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6')dnl
DAEMON_OPTIONS(`Family=inet6, address=::, Name=MTA6, Modifiers=O')dnl