Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Give portalgo a compile-time override; for cases...



details:   https://anonhg.NetBSD.org/src/rev/4d2552a2f529
branches:  trunk
changeset: 787089:4d2552a2f529
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat Jun 01 11:01:48 2013 +0000

description:
Give portalgo a compile-time override; for cases where the default default
doesn't make enough sense to even consider it (a lot of outgoing connections
from rump kernels with local port 65535).

diffstat:

 sys/netinet/portalgo.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r efd50f93e34a -r 4d2552a2f529 sys/netinet/portalgo.c
--- a/sys/netinet/portalgo.c    Sat Jun 01 10:54:24 2013 +0000
+++ b/sys/netinet/portalgo.c    Sat Jun 01 11:01:48 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: portalgo.c,v 1.4 2012/12/07 02:27:41 christos Exp $    */
+/*     $NetBSD: portalgo.c,v 1.5 2013/06/01 11:01:48 pooka Exp $       */
 
 /*
  * Copyright 2011 Vlad Balan
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.4 2012/12/07 02:27:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: portalgo.c,v 1.5 2013/06/01 11:01:48 pooka Exp $");
 
 #include "opt_inet.h"
 
@@ -86,13 +86,20 @@
 #define DPRINTF while (/*CONSTCOND*/0) printf
 #endif
 
+#ifndef PORTALGO_INET4_DEFAULT
+#define PORTALGO_INET4_DEFAULT PORTALGO_BSD
+#endif
+#ifndef PORTALGO_INET6_DEFAULT
+#define PORTALGO_INET6_DEFAULT PORTALGO_BSD
+#endif
+
 typedef __BITMAP_TYPE(, uint32_t, 0x10000) bitmap;
 #ifdef INET
-static int inet4_portalgo = PORTALGO_BSD;
+static int inet4_portalgo = PORTALGO_INET4_DEFAULT;
 static bitmap inet4_reserve;
 #endif
 #ifdef INET6
-static int inet6_portalgo = PORTALGO_BSD;
+static int inet6_portalgo = PORTALGO_INET6_DEFAULT;
 static bitmap inet6_reserve;
 #endif
 



Home | Main Index | Thread Index | Old Index