diff options
author | bz <bz@FreeBSD.org> | 2011-04-20 08:05:23 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2011-04-20 08:05:23 +0000 |
commit | 80925a07fad09de9a756c7b84429c530ee3f3507 (patch) | |
tree | 72af22f084caf76f9749d4bb7fd947c6241e77f5 | |
parent | bbba6487bf30314239e6ccd61060407bdfc8d6d6 (diff) | |
download | FreeBSD-src-80925a07fad09de9a756c7b84429c530ee3f3507.zip FreeBSD-src-80925a07fad09de9a756c7b84429c530ee3f3507.tar.gz |
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
-rw-r--r-- | sys/netinet6/in6_proto.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 3a8a0e6..acd1569 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -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 }, { |