Date: Fri, 10 Oct 2008 21:18:12 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r183753 - stable/7/sys/netinet Message-ID: <200810102118.m9ALIC5M001203@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Fri Oct 10 21:18:12 2008 New Revision: 183753 URL: http://svn.freebsd.org/changeset/base/183753 Log: Test the soreceive_dgram tunable and set up the pr_usrreqs structure during UDP initialization, not during UDP inpcb initialization. Reported by: Vlad GALU <dudu at dudu dot ro> Approved by: re (kib) Modified: stable/7/sys/netinet/udp_usrreq.c Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 20:05:15 2008 (r183752) +++ stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 21:18:12 2008 (r183753) @@ -163,14 +163,6 @@ udp_inpcb_init(void *mem, int size, int { struct inpcb *inp; - TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", - &udp_soreceive_dgram); - if (udp_soreceive_dgram) { - udp_usrreqs.pru_soreceive = soreceive_dgram; -#ifdef INET6 - udp6_usrreqs.pru_soreceive = soreceive_dgram; -#endif - } inp = mem; INP_LOCK_INIT(inp, "inp", "udpinp"); return (0); @@ -192,6 +184,14 @@ udp_init(void) uma_zone_set_max(udbinfo.ipi_zone, maxsockets); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); + TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", + &udp_soreceive_dgram); + if (udp_soreceive_dgram) { + udp_usrreqs.pru_soreceive = soreceive_dgram; +#ifdef INET6 + udp6_usrreqs.pru_soreceive = soreceive_dgram; +#endif + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810102118.m9ALIC5M001203>