Fix /stats U and TOS settings for outbound server connects.
[ircu2.10.12-pk.git] / ircd / s_bsd.c
index ead38dfb887866e08b27ab5f5e1391b224f8e530..0ddd46db33fd60f508d7db7271beb344cf85a99b 100644 (file)
@@ -259,6 +259,12 @@ static int connect_inet(struct ConfItem* aconf, struct Client* cptr)
     cli_fd(cptr) = -1;
     return 0;
   }
+  /*
+   * Set the TOS bits - this is nonfatal if it doesn't stick.
+   */
+  if (!os_set_tos(cli_fd(cptr), FEAT_TOS_SERVER)) {
+    report_error(TOS_ERROR_MSG, cli_name(cptr), errno);
+  }
   if ((result = os_connect_nonb(cli_fd(cptr), &aconf->address)) == IO_FAILURE) {
     cli_error(cptr) = errno;
     report_error(CONNECT_ERROR_MSG, cli_name(cptr), errno);