summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2010-04-06 18:07:49 +0300
committerAlexander Larsson <alexl@redhat.com>2010-04-06 17:45:04 +0200
commit4acf155fb2ced327495fe95e64bf62117f5d307a (patch)
treea0b37ece70ca6f9114dca4f58615baa5d3d1153c /server
parent88aa56045a57e760beb35e659731741dc15f3aac (diff)
server configuration: make network redirection support optional
By default it is disabled. To enable: configure --enable-tunnel. When active, requires libslirp.
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am12
-rw-r--r--server/reds.c8
2 files changed, 17 insertions, 3 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index 0fe1c0e..d09e2d2 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -50,6 +50,15 @@ libspice_server_la_LIBADD = \
$(LIBRT) \
$(NULL)
+if SUPPORT_TUNNEL
+ TUNNEL_SRCS = \
+ red_tunnel_worker.c \
+ red_tunnel_worker.h \
+ $(NULL)
+else
+ TUNNEL_SRCS =
+endif
+
libspice_server_la_SOURCES = \
glz_encoder.c \
glz_encoder_config.h \
@@ -73,10 +82,9 @@ libspice_server_la_SOURCES = \
snd_worker.h \
red_channel.h \
red_channel.c \
- red_tunnel_worker.c \
- red_tunnel_worker.h \
spice.h \
vd_interface.h \
+ $(TUNNEL_SRCS) \
$(COMMON_SRCS) \
$(NULL)
diff --git a/server/reds.c b/server/reds.c
index ef088f0..675db61 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -46,11 +46,13 @@
#include "red_common.h"
#include "red_dispatcher.h"
#include "snd_worker.h"
-#include "red_tunnel_worker.h"
#include <spice/stats.h>
#include "stat.h"
#include "ring.h"
#include "config.h"
+#ifdef HAVE_SLIRP
+#include "red_tunnel_worker.h"
+#endif
CoreInterface *core = NULL;
static MigrationInterface *mig = NULL;
@@ -5162,6 +5164,7 @@ static void interface_change_notifier(void *opaque, VDInterface *interface,
}
attach_to_red_agent((VDIPortInterface *)interface);
} else if (strcmp(interface->type, VD_INTERFACE_NET_WIRE) == 0) {
+#ifdef HAVE_SLIRP
NetWireInterface * net_wire = (NetWireInterface *)interface;
red_printf("VD_INTERFACE_NET_WIRE");
if (red_tunnel) {
@@ -5174,6 +5177,9 @@ static void interface_change_notifier(void *opaque, VDInterface *interface,
return;
}
red_tunnel = red_tunnel_attach(core, net_wire);
+#else
+ red_printf("unsupported net wire interface");
+#endif
}
break;
case VD_INTERFACE_REMOVING: