diff options
-rw-r--r-- | sys/netinet/in_pcb.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 1 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 6073c49..6706bc4 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -236,6 +236,8 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, const char *name, NULL, NULL, inpcbzone_init, inpcbzone_fini, UMA_ALIGN_PTR, inpcbzone_flags); uma_zone_set_max(pcbinfo->ipi_zone, maxsockets); + uma_zone_set_warning(pcbinfo->ipi_zone, + "kern.ipc.maxsockets limit reached"); } /* diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index e74d0aa..3c9dd34 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -367,6 +367,7 @@ tcp_init(void) V_tcpcb_zone = uma_zcreate("tcpcb", sizeof(struct tcpcb_mem), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(V_tcpcb_zone, maxsockets); + uma_zone_set_warning(V_tcpcb_zone, "kern.ipc.maxsockets limit reached"); tcp_tw_init(); syncache_init(); diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3b93b26..b6297dc 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -191,6 +191,7 @@ udp_init(void) V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); uma_zone_set_max(V_udpcb_zone, maxsockets); + uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached"); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); } |