|
|
7c5a8df |
--- cyrus-imapd-2.3.15/lib/imapoptions.orig 2009-06-29 10:21:06.000000000 -0700
|
|
|
7c5a8df |
+++ cyrus-imapd-2.3.15/lib/imapoptions 2009-12-14 13:40:56.000000000 -0800
|
|
|
7c5a8df |
@@ -854,6 +854,10 @@ are listed with ``<none>''.
|
|
|
7c5a8df |
strip the default realm from the userid (this does not affect the stripping
|
|
|
7c5a8df |
of realms specified by the afspts_localrealms option) */
|
|
|
7c5a8df |
|
|
|
7c5a8df |
+{ "qosmarking", "cs0", ENUM("cs0", "cs1", "cs2", "cs3", "cs4", "cs5", "cs6", "cs7", "af11", "af12", "af13", "af21", "af22", "af23", "af31", "af32", "af33", "af41", "af42", "af43", "ef") }
|
|
|
7c5a8df |
+/* This specifies the Class Selector or Differentiated Services Code Point
|
|
|
7c5a8df |
+ designation on IP headers (in the ToS field). */
|
|
|
7c5a8df |
+
|
|
|
7c5a8df |
{ "quota_db", "quotalegacy", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist", "sql", "quotalegacy")}
|
|
|
7c5a8df |
/* The cyrusdb backend to use for quotas. */
|
|
|
7c5a8df |
|
|
|
7c5a8df |
--- cyrus-imapd-2.3.15/lib/libconfig.c.orig 2009-08-20 08:26:15.000000000 -0700
|
|
|
7c5a8df |
+++ cyrus-imapd-2.3.15/lib/libconfig.c 2009-12-13 23:37:20.000000000 -0800
|
|
|
7c5a8df |
@@ -82,6 +82,7 @@ enum enum_value config_virtdomains;
|
|
|
7c5a8df |
enum enum_value config_mupdate_config; /* IMAP_ENUM_MUPDATE_CONFIG_STANDARD */
|
|
|
7c5a8df |
int config_maxword;
|
|
|
7c5a8df |
int config_maxquoted;
|
|
|
7c5a8df |
+int config_qosmarking;
|
|
|
7c5a8df |
|
|
|
7c5a8df |
/* declared in each binary that uses libconfig */
|
|
|
7c5a8df |
extern const int config_need_data;
|
|
|
7c5a8df |
@@ -210,11 +211,21 @@ static void config_ispartition(const cha
|
|
|
7c5a8df |
if (!strncmp("partition-", key, 10)) *found = 1;
|
|
|
7c5a8df |
}
|
|
|
7c5a8df |
|
|
|
7c5a8df |
+static const unsigned char qos[] = {
|
|
|
7c5a8df |
+/* cs0..cs7 */ 0x00, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0, 0xe0,
|
|
|
7c5a8df |
+/* af11..af13 */ 0x28, 0x30, 0x38,
|
|
|
7c5a8df |
+/* af21..af23 */ 0x48, 0x50, 0x58,
|
|
|
7c5a8df |
+/* af31..af33 */ 0x68, 0x70, 0x78,
|
|
|
7c5a8df |
+/* af41..af43 */ 0x88, 0x90, 0x98,
|
|
|
7c5a8df |
+/* ef */ 0xb8
|
|
|
7c5a8df |
+};
|
|
|
7c5a8df |
+
|
|
|
7c5a8df |
void config_read(const char *alt_config)
|
|
|
7c5a8df |
{
|
|
|
7c5a8df |
enum imapopt opt = IMAPOPT_ZERO;
|
|
|
7c5a8df |
char buf[4096];
|
|
|
7c5a8df |
char *p;
|
|
|
7c5a8df |
+ int ival;
|
|
|
7c5a8df |
|
|
|
7c5a8df |
/* xxx this is leaked, this may be able to be better in 2.2 (cyrus_done) */
|
|
|
7c5a8df |
if(alt_config) config_filename = xstrdup(alt_config);
|
|
|
7c5a8df |
@@ -328,6 +339,9 @@ void config_read(const char *alt_config)
|
|
|
7c5a8df |
/* set some limits */
|
|
|
7c5a8df |
config_maxquoted = config_getint(IMAPOPT_MAXQUOTED);
|
|
|
7c5a8df |
config_maxword = config_getint(IMAPOPT_MAXWORD);
|
|
|
7c5a8df |
+
|
|
|
7c5a8df |
+ ival = config_getenum(IMAPOPT_QOSMARKING);
|
|
|
7c5a8df |
+ config_qosmarking = qos[ival];
|
|
|
7c5a8df |
}
|
|
|
7c5a8df |
|
|
|
7c5a8df |
#define GROWSIZE 4096
|
|
|
7c5a8df |
--- cyrus-imapd-2.3.15/lib/libconfig.h.orig 2008-09-23 10:34:38.000000000 -0700
|
|
|
7c5a8df |
+++ cyrus-imapd-2.3.15/lib/libconfig.h 2009-12-13 23:19:40.000000000 -0800
|
|
|
7c5a8df |
@@ -80,6 +80,7 @@ extern enum enum_value config_virtdomain
|
|
|
7c5a8df |
extern enum enum_value config_mupdate_config;
|
|
|
7c5a8df |
extern int config_maxquoted;
|
|
|
7c5a8df |
extern int config_maxword;
|
|
|
7c5a8df |
+extern int config_qosmarking;
|
|
|
7c5a8df |
|
|
|
7c5a8df |
/* config requirement flags */
|
|
|
7c5a8df |
#define CONFIG_NEED_PARTITION_DATA (1<<0)
|
|
|
7c5a8df |
--- cyrus-imapd-2.3.15/master/master.c.orig 2009-03-30 21:11:23.000000000 -0700
|
|
|
7c5a8df |
+++ cyrus-imapd-2.3.15/master/master.c 2009-12-14 14:18:24.000000000 -0800
|
|
|
7c5a8df |
@@ -439,6 +439,15 @@ void service_create(struct service *s)
|
|
|
7c5a8df |
}
|
|
|
7c5a8df |
#endif
|
|
|
7c5a8df |
|
|
|
7c5a8df |
+ /* set IP ToS if supported */
|
|
|
7c5a8df |
+#if defined(SOL_IP) && defined(IP_TOS)
|
|
|
7c5a8df |
+ r = setsockopt(s->socket, SOL_IP, IP_TOS,
|
|
|
7c5a8df |
+ (void *) &config_qosmarking, sizeof(config_qosmarking));
|
|
|
7c5a8df |
+ if (r < 0) {
|
|
|
7c5a8df |
+ syslog(LOG_WARNING, "unable to setsocketopt(IP_TOS): %m");
|
|
|
7c5a8df |
+ }
|
|
|
7c5a8df |
+#endif
|
|
|
7c5a8df |
+
|
|
|
7c5a8df |
oldumask = umask((mode_t) 0); /* for linux */
|
|
|
7c5a8df |
r = bind(s->socket, res->ai_addr, res->ai_addrlen);
|
|
|
7c5a8df |
umask(oldumask);
|