summaryrefslogtreecommitdiff
path: root/gnu/dist
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2001-01-15 17:49:25 +0000
committeritojun <itojun@NetBSD.org>2001-01-15 17:49:25 +0000
commitef39bb4e09b752d4e06b968e26f3efade438771f (patch)
tree71aacdb8b1d6e5d8247158a0ef9df64946b725e1 /gnu/dist
parent880b841888b19ac73d9bd2ab28493cd774b1ea95 (diff)
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)
Diffstat (limited to 'gnu/dist')
-rw-r--r--gnu/dist/sendmail/sendmail/daemon.c10
-rw-r--r--gnu/dist/sendmail/sendmail/sendmail.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/gnu/dist/sendmail/sendmail/daemon.c b/gnu/dist/sendmail/sendmail/daemon.c
index 68ab6c0d881..07d1ed7896a 100644
--- a/gnu/dist/sendmail/sendmail/daemon.c
+++ b/gnu/dist/sendmail/sendmail/daemon.c
@@ -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,
diff --git a/gnu/dist/sendmail/sendmail/sendmail.h b/gnu/dist/sendmail/sendmail/sendmail.h
index d5d046a9fa8..e353629b3ea 100644
--- a/gnu/dist/sendmail/sendmail/sendmail.h
+++ b/gnu/dist/sendmail/sendmail/sendmail.h
@@ -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 */