1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

SCTP needs either IPv4 or IPv6 as lower layer[1].

So properly hide the already #ifdef SCTP code with
#if defined(INET) || defined(INET6) as well to get us
closer to a non-INET/INET6 kernel.

Discussed with:	tuexen [1]
This commit is contained in:
Bjoern A. Zeeb 2009-06-10 14:36:59 +00:00
parent 74b0900f05
commit c03528b663
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193926
2 changed files with 12 additions and 4 deletions

View File

@ -35,6 +35,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_sctp.h"
#include "opt_compat.h"
#include "opt_ktrace.h"
@ -77,10 +79,12 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_kern.h>
#include <vm/vm_extern.h>
#if defined(INET) || defined(INET6)
#ifdef SCTP
#include <netinet/sctp.h>
#include <netinet/sctp_peeloff.h>
#endif /* SCTP */
#endif /* INET || INET6 */
static int sendit(struct thread *td, int s, struct msghdr *mp, int flags);
static int recvit(struct thread *td, int s, struct msghdr *mp, void *namelenp);
@ -2269,7 +2273,7 @@ sctp_peeloff(td, uap)
caddr_t name;
} */ *uap;
{
#ifdef SCTP
#if (defined(INET) || defined(INET6)) && defined(SCTP)
struct filedesc *fdp;
struct file *nfp = NULL;
int error;
@ -2358,7 +2362,7 @@ sctp_generic_sendmsg (td, uap)
int flags
} */ *uap;
{
#ifdef SCTP
#if (defined(INET) || defined(INET6)) && defined(SCTP)
struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL;
struct socket *so;
struct file *fp = NULL;
@ -2459,7 +2463,7 @@ sctp_generic_sendmsg_iov(td, uap)
int flags
} */ *uap;
{
#ifdef SCTP
#if (defined(INET) || defined(INET6)) && defined(SCTP)
struct sctp_sndrcvinfo sinfo, *u_sinfo = NULL;
struct socket *so;
struct file *fp = NULL;
@ -2570,7 +2574,7 @@ sctp_generic_recvmsg(td, uap)
int *msg_flags
} */ *uap;
{
#ifdef SCTP
#if (defined(INET) || defined(INET6)) && defined(SCTP)
u_int8_t sockbufstore[256];
struct uio auio;
struct iovec *iov, *tiov;

View File

@ -65,9 +65,11 @@
#include <netinet6/scope6_var.h>
#endif
#if defined(INET) || defined(INET6)
#ifdef SCTP
extern void sctp_addr_change(struct ifaddr *ifa, int cmd);
#endif /* SCTP */
#endif
MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables");
@ -1063,6 +1065,7 @@ rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt)
KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE,
("unexpected cmd %u", cmd));
#if defined(INET) || defined(INET6)
#ifdef SCTP
/*
* notify the SCTP stack
@ -1071,6 +1074,7 @@ rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt)
*/
sctp_addr_change(ifa, cmd);
#endif /* SCTP */
#endif
if (route_cb.any_count == 0)
return;
for (pass = 1; pass < 3; pass++) {