From owner-svn-src-all@FreeBSD.ORG Wed Apr 20 08:05:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20207106566B; Wed, 20 Apr 2011 08:05:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F6458FC08; Wed, 20 Apr 2011 08:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3K85NLL037718; Wed, 20 Apr 2011 08:05:23 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3K85NaB037716; Wed, 20 Apr 2011 08:05:23 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104200805.p3K85NaB037716@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 20 Apr 2011 08:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220881 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2011 08:05:24 -0000 Author: bz Date: Wed Apr 20 08:05:23 2011 New Revision: 220881 URL: http://svn.freebsd.org/changeset/base/220881 Log: MFp4 CH=191760,191770: Not compiling in and not initializing from inetsw from in_proto.c for IPv6 only, we need to initialize upper layer protocols from inet6sw. Make sure to not initialize them twice in a Dual-Stack environment but only conditionally on no INET as we have done for TCP for a long time. Otherwise we would leak resources. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 3 days Modified: head/sys/netinet6/in6_proto.c Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Wed Apr 20 08:03:22 2011 (r220880) +++ head/sys/netinet6/in6_proto.c Wed Apr 20 08:05:23 2011 (r220881) @@ -169,6 +169,9 @@ struct ip6protosw inet6sw[] = { .pr_input = udp6_input, .pr_ctlinput = udp6_ctlinput, .pr_ctloutput = ip6_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = udp_init, +#endif .pr_usrreqs = &udp6_usrreqs, }, { @@ -196,6 +199,9 @@ struct ip6protosw inet6sw[] = { .pr_ctlinput = sctp6_ctlinput, .pr_ctloutput = sctp_ctloutput, .pr_drain = sctp_drain, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = sctp_init, +#endif .pr_usrreqs = &sctp6_usrreqs }, { @@ -231,6 +237,9 @@ struct ip6protosw inet6sw[] = { .pr_output = rip6_output, .pr_ctlinput = rip6_ctlinput, .pr_ctloutput = rip6_ctloutput, +#ifndef INET /* Do not call initialization twice. */ + .pr_init = rip_init, +#endif .pr_usrreqs = &rip6_usrreqs }, {