[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12422 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12422 - gnunet/src/vpn |
Date: |
Sat, 31 Jul 2010 01:35:25 +0200 |
Author: toelke
Date: 2010-07-31 01:35:25 +0200 (Sat, 31 Jul 2010)
New Revision: 12422
Modified:
gnunet/src/vpn/gnunet-daemon-vpn.c
gnunet/src/vpn/gnunet-helper-vpn.c
Log:
If the tun-if can't be initialized correctly, close the vpn-helper
Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c 2010-07-30 23:35:17 UTC (rev 12421)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c 2010-07-30 23:35:25 UTC (rev 12422)
@@ -78,6 +78,7 @@
static void restart_helper(void* cls, const struct
GNUNET_SCHEDULER_TaskContext* tskctx) {
+ // FIXME: Ratelimit this!
struct vpn_cls* mycls = (struct vpn_cls*) cls;
// Kill the helper
Modified: gnunet/src/vpn/gnunet-helper-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-helper-vpn.c 2010-07-30 23:35:17 UTC (rev 12421)
+++ gnunet/src/vpn/gnunet-helper-vpn.c 2010-07-30 23:35:25 UTC (rev 12422)
@@ -122,6 +122,12 @@
signal(SIGTERM, &term);
int fd_tun = init_tun(dev);
+
+ if (fd_tun < 0) {
+ fprintf(stderr, "Could not initialize tun-interface: %m\n");
+ exit(1);
+ }
+
fprintf(stderr, "Initialized the interface %s as %d.\n", dev, fd_tun);
// TODO: get this out of argv
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12422 - gnunet/src/vpn,
gnunet <=