- updated QoS patch, including upstream comments and AF_INET6 4-in-6 support
This commit is contained in:
parent
f823fb2a17
commit
91beabb023
@ -1,5 +1,5 @@
|
|||||||
--- sendmail-8.14.3/cf/m4/proto.m4.orig 2008-01-24 16:42:01.000000000 -0700
|
--- sendmail-8.14.4/cf/m4/proto.m4.orig 2011-01-11 20:02:14.000000000 -0700
|
||||||
+++ sendmail-8.14.3/cf/m4/proto.m4 2010-04-01 11:24:43.000000000 -0600
|
+++ sendmail-8.14.4/cf/m4/proto.m4 2011-01-11 20:02:14.000000000 -0700
|
||||||
@@ -251,6 +251,9 @@ _OPTION(SevenBitInput, `confSEVEN_BIT_IN
|
@@ -251,6 +251,9 @@ _OPTION(SevenBitInput, `confSEVEN_BIT_IN
|
||||||
# 8-bit data handling
|
# 8-bit data handling
|
||||||
_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `pass8')
|
_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', `pass8')
|
||||||
@ -10,9 +10,9 @@
|
|||||||
# wait for alias file rebuild (default units: minutes)
|
# wait for alias file rebuild (default units: minutes)
|
||||||
_OPTION(AliasWait, `confALIAS_WAIT', `5m')
|
_OPTION(AliasWait, `confALIAS_WAIT', `5m')
|
||||||
|
|
||||||
--- sendmail-8.14.3/cf/cf/submit.mc.orig 2006-04-04 23:54:41.000000000 -0600
|
--- sendmail-8.14.4/cf/cf/submit.mc.orig 2011-01-11 20:02:14.000000000 -0700
|
||||||
+++ sendmail-8.14.3/cf/cf/submit.mc 2010-03-19 12:08:25.000000000 -0600
|
+++ sendmail-8.14.4/cf/cf/submit.mc 2011-01-11 20:02:14.000000000 -0700
|
||||||
@@ -22,6 +22,8 @@
|
@@ -22,6 +22,8 @@ define(`__OSTYPE__',`')dnl dirty hack to
|
||||||
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
|
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
|
||||||
define(`confTIME_ZONE', `USE_TZ')dnl
|
define(`confTIME_ZONE', `USE_TZ')dnl
|
||||||
define(`confDONT_INIT_GROUPS', `True')dnl
|
define(`confDONT_INIT_GROUPS', `True')dnl
|
||||||
@ -21,57 +21,106 @@
|
|||||||
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
|
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
|
||||||
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl
|
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl
|
||||||
FEATURE(`use_ct_file')dnl
|
FEATURE(`use_ct_file')dnl
|
||||||
--- sendmail-8.14.3/sendmail/sendmail.h.orig 2008-02-15 16:19:58.000000000 -0700
|
--- sendmail-8.14.4/sendmail/sendmail.h.orig 2009-12-18 10:08:01.000000000 -0700
|
||||||
+++ sendmail-8.14.3/sendmail/sendmail.h 2009-11-28 14:11:51.000000000 -0700
|
+++ sendmail-8.14.4/sendmail/sendmail.h 2011-01-11 20:39:35.000000000 -0700
|
||||||
@@ -2373,7 +2373,9 @@ EXTERN struct termescape TermEscape; /*
|
@@ -2387,7 +2387,14 @@ EXTERN struct termescape TermEscape; /*
|
||||||
EXTERN SOCKADDR ConnectOnlyTo; /* override connection address (for testing) */
|
EXTERN SOCKADDR ConnectOnlyTo; /* override connection address (for testing) */
|
||||||
EXTERN SOCKADDR RealHostAddr; /* address of host we are talking to */
|
EXTERN SOCKADDR RealHostAddr; /* address of host we are talking to */
|
||||||
extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */
|
extern const SM_EXC_TYPE_T EtypeQuickAbort; /* type of a QuickAbort exception */
|
||||||
-
|
-
|
||||||
+#if defined(SOL_IP) && defined(IP_TOS)
|
+#if _FFR_QOS
|
||||||
+EXTERN int InetQoS; /* QoS mapping */
|
+# if !defined(SOL_IP) && defined(IPPROTO_IP)
|
||||||
|
+# define SOL_IP IPPROTO_IP
|
||||||
|
+# endif
|
||||||
|
+# if defined(SOL_IP) && defined(IP_TOS)
|
||||||
|
+EXTERN int InetQoS; /* QoS mapping */
|
||||||
|
+# endif
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
EXTERN int ConnectionRateWindowSize;
|
EXTERN int ConnectionRateWindowSize;
|
||||||
|
|
||||||
--- sendmail-8.14.3/sendmail/daemon.c.orig 2008-02-13 17:20:26.000000000 -0700
|
--- sendmail-8.14.4/sendmail/conf.c.orig 2011-01-11 20:02:14.000000000 -0700
|
||||||
+++ sendmail-8.14.3/sendmail/daemon.c 2009-11-28 14:16:37.000000000 -0700
|
+++ sendmail-8.14.4/sendmail/conf.c 2011-01-11 20:24:29.000000000 -0700
|
||||||
@@ -104,6 +104,8 @@
|
@@ -6298,6 +6298,10 @@ char *FFRCompileOptions[] =
|
||||||
|
#if _FFR_QF_PARANOIA
|
||||||
|
"_FFR_QF_PARANOIA",
|
||||||
|
#endif /* _FFR_QF_PARANOIA */
|
||||||
|
+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||||
|
+ /* QoS */
|
||||||
|
+ "_FFR_QOS",
|
||||||
|
+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */
|
||||||
|
#if _FFR_QUEUEDELAY
|
||||||
|
/* Exponential queue delay; disabled in 8.13 since it isn't used. */
|
||||||
|
"_FFR_QUEUEDELAY",
|
||||||
|
--- sendmail-8.14.4/sendmail/daemon.c.orig 2009-12-17 18:12:40.000000000 -0700
|
||||||
|
+++ sendmail-8.14.4/sendmail/daemon.c 2011-01-11 20:46:37.000000000 -0700
|
||||||
|
@@ -104,6 +104,10 @@ static int NDaemons = 0; /* actual num
|
||||||
|
|
||||||
static time_t NextDiskSpaceCheck = 0;
|
static time_t NextDiskSpaceCheck = 0;
|
||||||
|
|
||||||
|
+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||||
+int InetQoS = 0; /* none by default */
|
+int InetQoS = 0; /* none by default */
|
||||||
|
+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */
|
||||||
+
|
+
|
||||||
/*
|
/*
|
||||||
** GETREQUESTS -- open mail IPC port and get requests.
|
** GETREQUESTS -- open mail IPC port and get requests.
|
||||||
**
|
**
|
||||||
@@ -1131,6 +1131,12 @@ opendaemonsocket(d, firsttime)
|
@@ -1131,6 +1135,16 @@ opendaemonsocket(d, firsttime)
|
||||||
(void) setsockopt(d->d_socket, SOL_SOCKET,
|
(void) setsockopt(d->d_socket, SOL_SOCKET,
|
||||||
SO_KEEPALIVE, (char *)&on, sizeof(on));
|
SO_KEEPALIVE, (char *)&on, sizeof(on));
|
||||||
|
|
||||||
+#if defined(SOL_IP) && defined(IP_TOS)
|
+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||||
+ if (d->d_addr.sa.sa_family == AF_INET && InetQoS != 0x00)
|
+ if (InetQoS != 0x00
|
||||||
+ (void) setsockopt(d->d_socket, SOL_IP,
|
+ && (d->d_addr.sa.sa_family == AF_INET
|
||||||
+ IP_TOS, (char *)&InetQoS, sizeof(InetQoS));
|
+ || (d->d_addr.sin6.sin6_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(d->d_addr.sin6.sin6_addr.s6_addr32)))) {
|
||||||
+#endif
|
+ if (setsockopt(d->d_socket, SOL_IP,
|
||||||
|
+ IP_TOS, (char *)&InetQoS, sizeof(InetQoS)) < 0)
|
||||||
|
+ syserr("opendaemonsock: daemon %s: setsockopt(IP_TOS)", d->d_name);
|
||||||
|
+ }
|
||||||
|
+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */
|
||||||
+
|
+
|
||||||
#ifdef SO_RCVBUF
|
#ifdef SO_RCVBUF
|
||||||
if (d->d_tcprcvbufsize > 0)
|
if (d->d_tcprcvbufsize > 0)
|
||||||
{
|
{
|
||||||
--- sendmail-8.14.3/sendmail/readcf.c.orig 2008-02-14 10:25:14.000000000 -0700
|
@@ -2565,6 +2579,16 @@ gothostent:
|
||||||
+++ sendmail-8.14.3/sendmail/readcf.c 2009-12-10 00:12:23.000000000 -0700
|
return EX_TEMPFAIL;
|
||||||
@@ -2271,6 +2271,10 @@
|
}
|
||||||
|
|
||||||
|
+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||||
|
+ if (InetQoS != 0x00
|
||||||
|
+ && (family == AF_INET
|
||||||
|
+ || (family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(addr.sin6.sin6_addr.s6_addr32))))
|
||||||
|
+ {
|
||||||
|
+ if (setsockopt(s, SOL_IP, IP_TOS,
|
||||||
|
+ (char *)&InetQoS, sizeof(InetQoS)) < 0)
|
||||||
|
+ syserr("makeconnection: setsockopt(IP_TOS)");
|
||||||
|
+ }
|
||||||
|
+#endif /* _FFR_QOS && defined(SOL_IP) && defined(IP_TOS) */
|
||||||
|
#ifdef SO_SNDBUF
|
||||||
|
if (ClientSettings[family].d_tcpsndbufsize > 0)
|
||||||
|
{
|
||||||
|
--- sendmail-8.14.4/sendmail/readcf.c.orig 2009-10-26 11:47:00.000000000 -0600
|
||||||
|
+++ sendmail-8.14.4/sendmail/readcf.c 2011-01-11 20:37:35.000000000 -0700
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
|
||||||
|
#if NETINET || NETINET6
|
||||||
|
# include <arpa/inet.h>
|
||||||
|
+# include <netinet/ip.h>
|
||||||
|
#endif /* NETINET || NETINET6 */
|
||||||
|
|
||||||
|
#define SECONDS
|
||||||
|
@@ -2271,6 +2271,10 @@ static struct optioninfo
|
||||||
# define O_RCPTTHROTDELAY 0xe6
|
# define O_RCPTTHROTDELAY 0xe6
|
||||||
{ "BadRcptThrottleDelay", O_RCPTTHROTDELAY, OI_SAFE },
|
{ "BadRcptThrottleDelay", O_RCPTTHROTDELAY, OI_SAFE },
|
||||||
#endif /* _FFR_RCPTTHROTDELAY */
|
#endif /* _FFR_RCPTTHROTDELAY */
|
||||||
+#if defined(SOL_IP) && defined(IP_TOS)
|
+#if _FFR_QOS && defined(SOL_IP) && defined(IP_TOS)
|
||||||
+# define O_INETQOS 0xe7
|
+# define O_INETQOS 0xe7
|
||||||
+ { "InetQoS", O_INETQOS, OI_NONE },
|
+ { "InetQoS", O_INETQOS, OI_NONE },
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
{ NULL, '\0', OI_NONE }
|
{ NULL, '\0', OI_NONE }
|
||||||
};
|
};
|
||||||
@@ -2351,6 +2355,37 @@
|
@@ -2351,6 +2355,77 @@ static struct ssl_options
|
||||||
};
|
};
|
||||||
#endif /* STARTTLS && _FFR_TLS_1 */
|
#endif /* STARTTLS && _FFR_TLS_1 */
|
||||||
|
|
||||||
@ -81,26 +130,66 @@
|
|||||||
+ char *name; /* name of the setting */
|
+ char *name; /* name of the setting */
|
||||||
+ int value; /* corresponding setsockopt() value */
|
+ int value; /* corresponding setsockopt() value */
|
||||||
+} QoSMap[] = {
|
+} QoSMap[] = {
|
||||||
+ { "CS0", 0x00 },
|
+#ifdef IPTOS_CLASS_CS0
|
||||||
+ { "CS1", 0x20 },
|
+ { "CS0", IPTOS_CLASS_CS0 },
|
||||||
+ { "AF11", 0x28 },
|
+#endif
|
||||||
+ { "AF12", 0x30 },
|
+#ifdef IPTOS_CLASS_CS1
|
||||||
+ { "AF13", 0x38 },
|
+ { "CS1", IPTOS_CLASS_CS1 },
|
||||||
+ { "CS2", 0x40 },
|
+#endif
|
||||||
+ { "AF21", 0x48 },
|
+#ifdef IPTOS_DSCP_AF11
|
||||||
+ { "AF22", 0x50 },
|
+ { "AF11", IPTOS_DSCP_AF11 },
|
||||||
+ { "AF23", 0x58 },
|
+#endif
|
||||||
+ { "CS3", 0x60 },
|
+#ifdef IPTOS_DSCP_AF12
|
||||||
+ { "AF31", 0x68 },
|
+ { "AF12", IPTOS_DSCP_AF12 },
|
||||||
+ { "AF32", 0x70 },
|
+#endif
|
||||||
+ { "AF33", 0x78 },
|
+#ifdef IPTOS_DSCP_AF13
|
||||||
+ { "CS4", 0x80 },
|
+ { "AF13", IPTOS_DSCP_AF13 },
|
||||||
+ { "AF41", 0x88 },
|
+#endif
|
||||||
+ { "AF42", 0x90 },
|
+#ifdef IPTOS_CLASS_CS2
|
||||||
+ { "AF43", 0x98 },
|
+ { "CS2", IPTOS_CLASS_CS2 },
|
||||||
+ { "CS5", 0xa0 },
|
+#endif
|
||||||
+ { "CS6", 0xc0 },
|
+#ifdef IPTOS_DSCP_AF21
|
||||||
+ { "CS7", 0xe0 },
|
+ { "AF21", IPTOS_DSCP_AF21 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF22
|
||||||
|
+ { "AF22", IPTOS_DSCP_AF22 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF23
|
||||||
|
+ { "AF23", IPTOS_DSCP_AF23 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_CLASS_CS3
|
||||||
|
+ { "CS3", IPTOS_CLASS_CS3 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF31
|
||||||
|
+ { "AF31", IPTOS_DSCP_AF31 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF32
|
||||||
|
+ { "AF32", IPTOS_DSCP_AF32 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF33
|
||||||
|
+ { "AF33", IPTOS_DSCP_AF33 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_CLASS_CS4
|
||||||
|
+ { "CS4", IPTOS_CLASS_CS4 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF41
|
||||||
|
+ { "AF41", IPTOS_DSCP_AF41 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF42
|
||||||
|
+ { "AF42", IPTOS_DSCP_AF42 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_DSCP_AF43
|
||||||
|
+ { "AF43", IPTOS_DSCP_AF43 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_CLASS_CS5
|
||||||
|
+ { "CS5", IPTOS_CLASS_CS5 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_CLASS_CS6
|
||||||
|
+ { "CS6", IPTOS_CLASS_CS6 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef IPTOS_CLASS_CS7
|
||||||
|
+ { "CS7", IPTOS_CLASS_CS7 },
|
||||||
|
+#endif
|
||||||
+ { "none", 0x00 },
|
+ { "none", 0x00 },
|
||||||
+ { NULL, 0 }
|
+ { NULL, 0 }
|
||||||
+};
|
+};
|
||||||
@ -109,7 +198,7 @@
|
|||||||
|
|
||||||
# define CANONIFY(val)
|
# define CANONIFY(val)
|
||||||
|
|
||||||
@@ -3985,6 +4020,33 @@
|
@@ -3985,6 +4060,33 @@ setoption(opt, val, safe, sticky, e)
|
||||||
break;
|
break;
|
||||||
#endif /* _FFR_BADRCPT_SHUTDOWN */
|
#endif /* _FFR_BADRCPT_SHUTDOWN */
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Summary: A widely used Mail Transport Agent (MTA)
|
Summary: A widely used Mail Transport Agent (MTA)
|
||||||
Name: sendmail
|
Name: sendmail
|
||||||
Version: 8.14.4
|
Version: 8.14.4
|
||||||
Release: 18%{?dist}
|
Release: 19%{?dist}
|
||||||
License: Sendmail
|
License: Sendmail
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.sendmail.org/
|
URL: http://www.sendmail.org/
|
||||||
@ -209,7 +209,7 @@ sed -i 's|/usr/local/bin/perl|%{_bindir}/perl|' contrib/*.pl
|
|||||||
cat > redhat.config.m4 << EOF
|
cat > redhat.config.m4 << EOF
|
||||||
define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1')
|
define(\`confMAPDEF', \`-DNEWDB -DNIS -DHESIOD -DMAP_REGEX -DSOCKETMAP -DNAMED_BIND=1')
|
||||||
define(\`confOPTIMIZE', \`\`\`\`${RPM_OPT_FLAGS}'''')
|
define(\`confOPTIMIZE', \`\`\`\`${RPM_OPT_FLAGS}'''')
|
||||||
define(\`confENVDEF', \`-I%{_includedir}/libdb -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_TLS_1 -D_FFR_LINUX_MHNL')
|
define(\`confENVDEF', \`-I%{_includedir}/libdb -I/usr/kerberos/include -Wall -DXDEBUG=0 -DTCPWRAPPERS -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_TLS_1 -D_FFR_LINUX_MHNL -D_FFR_QOS')
|
||||||
define(\`confLIBDIRS', \`-L/usr/kerberos/%{_lib}')
|
define(\`confLIBDIRS', \`-L/usr/kerberos/%{_lib}')
|
||||||
define(\`confLIBS', \`-lnsl -lwrap -lhesiod -lcrypt -ldb -lresolv')
|
define(\`confLIBS', \`-lnsl -lwrap -lhesiod -lcrypt -ldb -lresolv')
|
||||||
define(\`confMANOWN', \`root')
|
define(\`confMANOWN', \`root')
|
||||||
@ -648,6 +648,9 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 12 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 8.14.4-19
|
||||||
|
- updated QoS patch, including upstream comments and AF_INET6 4-in-6 support
|
||||||
|
|
||||||
* Mon Jan 10 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 8.14.4-18
|
* Mon Jan 10 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 8.14.4-18
|
||||||
- add QoS support, patch from Philip Prindeville <philipp@fedoraproject.org>
|
- add QoS support, patch from Philip Prindeville <philipp@fedoraproject.org>
|
||||||
upstream reserved option ID 0xe7 for testing of this new feature (#576643)
|
upstream reserved option ID 0xe7 for testing of this new feature (#576643)
|
||||||
|
Loading…
Reference in New Issue
Block a user