summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-04-30 11:17:00 +0000
committerbz <bz@FreeBSD.org>2011-04-30 11:17:00 +0000
commit734a66b389401392d78d4cb81b576bbbf9de9a29 (patch)
tree6ffbe83b7e9d453a2b2ff40373da7e90f1ad92ba /sys/netinet6
parent337d0d95c24e2804d3da6635f2a555e9489c1e5f (diff)
downloadFreeBSD-src-734a66b389401392d78d4cb81b576bbbf9de9a29.zip
FreeBSD-src-734a66b389401392d78d4cb81b576bbbf9de9a29.tar.gz
Make the UDP code compile without INET. Expose udp_usrreq.c to IPv6 only
as well compiling out most functions adding or extending #ifdef INET coverage. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 4 days
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/udp6_usrreq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 04ba3c5..d574c19 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -849,6 +849,7 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
if (IN6_IS_ADDR_UNSPECIFIED(&sin6_p->sin6_addr))
inp->inp_vflag |= INP_IPV4;
+#ifdef INET
else if (IN6_IS_ADDR_V4MAPPED(&sin6_p->sin6_addr)) {
struct sockaddr_in sin;
@@ -859,10 +860,13 @@ udp6_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
td->td_ucred);
goto out;
}
+#endif
}
error = in6_pcbbind(inp, nam, td->td_ucred);
+#ifdef INET
out:
+#endif
INP_WUNLOCK(inp);
INP_INFO_WUNLOCK(&V_udbinfo);
return (error);
@@ -909,6 +913,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
INP_INFO_WLOCK(&V_udbinfo);
INP_WLOCK(inp);
+#ifdef INET
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
struct sockaddr_in sin;
@@ -932,6 +937,7 @@ udp6_connect(struct socket *so, struct sockaddr *nam, struct thread *td)
soisconnected(so);
goto out;
}
+#endif
if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) {
error = EISCONN;
goto out;
OpenPOWER on IntegriCloud